Skip to content

Confirm never updates page in FF #31

@joostschouten

Description

@joostschouten

In firefox the confirm works good on ajax updates but not if the underlying link updates the whole page. Chrome works well. This is due to the following (see arrows):

function doAction() {
            if ($T(element).hasAction) {
                element.fire(Tapestry.ACTION_EVENT, capturedClickEvent);
                return;
            }

            /*
             * Is it a submit element (i.e., it has a click() method)? Try that
             * next.
             */

            if (element.click) {
                interceptClickEvent = false;

                element.click();
                return;             <--------!! This return prevents the window.location = element.href; from being reached !!
            }

            /*
             * Not a zone update, so just do a full page refresh to the
             * indicated URL.
             */
            window.location = element.href;
    }

Any reason why the return is there? Without it all seems to work for me.

This patch did the trick for me:

From b7854105325f4d9078aaa8e5ca9de35a617aafa3 Mon Sep 17 00:00:00 2001
From: Joost Schouten <***@jsportal.com>
Date: Thu, 28 Jul 2011 12:33:11 +0200
Subject: [PATCH] bugfix: removed the return statement from the doAction which was preventing a full page refresh in FF4

---
 .../com/howardlewisship/tapx/core/tapx.js          |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/tapx-core/src/main/resources/com/howardlewisship/tapx/core/tapx.js b/tapx-core/src/main/resources/com/howardlewisship/tapx/core/tapx.js
index d036984..4a11465 100644
--- a/tapx-core/src/main/resources/com/howardlewisship/tapx/core/tapx.js
+++ b/tapx-core/src/main/resources/com/howardlewisship/tapx/core/tapx.js
@@ -373,7 +373,6 @@ Tapx.extendInitializer(function() {
                interceptClickEvent = false;

                element.click();
-               return;
            }

            /*
-- 
1.6.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions