You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "mindhawk (JIRA)" <ji...@apache.org> on 2009/12/18 16:17:21 UTC

[jira] Created: (TAP5-957) Unexcept "beforeunload" event generated by ie

Unexcept "beforeunload" event generated by ie
---------------------------------------------

                 Key: TAP5-957
                 URL: https://issues.apache.org/jira/browse/TAP5-957
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.1.0.5
            Reporter: mindhawk
            Priority: Minor


IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.

Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 

I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "Raul Montes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861175#action_12861175 ] 

Raul Montes commented on TAP5-957:
----------------------------------

I think the correct approach is to use Unobtrusive JavaScript (http://en.wikipedia.org/wiki/Unobtrusive_JavaScript), which is encouraged by Tapestry itself (any script included with RenderSupport is rendered at the end of the page, on the dom loaded event).

Also, event delegation technique is very useful (http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/).

> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "mindhawk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861200#action_12861200 ] 

mindhawk commented on TAP5-957:
-------------------------------

Yes Unobtrusive JavaScript  is ge better way, but the bug is still there. "Tapestry.windowUnloaded" is a Tapestry's mechanism to avoid the response of a AJAX request.

It means although I can use some way to avoid the bug, but some one others would trigger it.

> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "mindhawk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

mindhawk reopened TAP5-957:
---------------------------


Unobtrusive JavaScript is not the key to the problem

> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "mindhawk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861200#action_12861200 ] 

mindhawk commented on TAP5-957:
-------------------------------

Yes Unobtrusive JavaScript  is ge better way, but the bug is still there. "Tapestry.windowUnloaded" is a Tapestry's mechanism to avoid the response of a AJAX request.

It means although I can use some way to avoid the bug, but some one others would trigger it.

> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "Raul Montes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861175#action_12861175 ] 

Raul Montes commented on TAP5-957:
----------------------------------

I think the correct approach is to use Unobtrusive JavaScript (http://en.wikipedia.org/wiki/Unobtrusive_JavaScript), which is encouraged by Tapestry itself (any script included with RenderSupport is rendered at the end of the page, on the dom loaded event).

Also, event delegation technique is very useful (http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/).

> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "mindhawk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864998#action_12864998 ] 

mindhawk commented on TAP5-957:
-------------------------------

I think Tapestry should not only care about the qualified programmers, but also some other ones.

I found this bug while writing some test code. I did not want to waste my time to write some other code for a test. But, it really puzzles me for no ajax responses returned after I clicked the link. It wasted me a whole day to find the reason and given a simple way to avoid the bug.

I also think Unobtrusive JavaScript is not the key to the problem, because as I have said "<a onClick="javascript:show()" href='#'>" is enough. That means the problem is "<a href='javascript:show()'>" will trigger a event which will make tapestry broken it cross-browser principle. Unobtrusive JavaScript is other way to register an event as the attribute "onClick" do.

If you want your framework accepted by more and more programmers, not only the ones who knows what is anti-pattern and keep on doing best practice all the time, you should make the framework stronger and care about some tedious things. At least, you should respect the one who find the bug and the way to avoid it.

If any "<a href='javascript:show()'>" existed, and if unfortunately the link is clicked, what a damn is that the whole page is dead and no ajax response will returned. 

A touch breaks a page!!!!


> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "Raul Montes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888498#action_12888498 ] 

Raul Montes commented on TAP5-957:
----------------------------------

Today I found a case where this bug is triggered even when (at least from what I know) good JavaScript practices are used: when you want an anchor used only to trigger some JavaScript behaviour you could, for example, set href="#" on the link, and then observe the click event. BUT the problem with this is that the "#" character is appended to the URL on the browser (unless you stop the event, which you cannot always do). Another way (and recommended) is to set href to "javascript:void(0)", which does absolutely nothing and you can observe the click event without any problem.

The problem is that, only in IE (of course...), this "javascript:void(0)" triggers the beforeunload event (like the javascript:show() reported in this issue) so this recommended practice for "unlinked links" is not possible in Tapestry.

I created a ticket a few months ago very related to this problem (https://issues.apache.org/jira/browse/TAP5-1115). I think changing the observed event from beforeunload to just unload should fix both issues. The issue TAP5-1115 has been apparently ignored :( even when I think is a big problem: if you click a link that downloads a file without leaving the page (which is very common), any Ajax behaviour stops working because of this.

Please, at least give us feedback about what you think for both of these issues.

> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "mindhawk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864998#action_12864998 ] 

mindhawk commented on TAP5-957:
-------------------------------

I think Tapestry should not only care about the qualified programmers, but also some other ones.

I found this bug while writing some test code. I did not want to waste my time to write some other code for a test. But, it really puzzles me for no ajax responses returned after I clicked the link. It wasted me a whole day to find the reason and given a simple way to avoid the bug.

I also think Unobtrusive JavaScript is not the key to the problem, because as I have said "<a onClick="javascript:show()" href='#'>" is enough. That means the problem is "<a href='javascript:show()'>" will trigger a event which will make tapestry broken it cross-browser principle. Unobtrusive JavaScript is other way to register an event as the attribute "onClick" do.

If you want your framework accepted by more and more programmers, not only the ones who knows what is anti-pattern and keep on doing best practice all the time, you should make the framework stronger and care about some tedious things. At least, you should respect the one who find the bug and the way to avoid it.

If any "<a href='javascript:show()'>" existed, and if unfortunately the link is clicked, what a damn is that the whole page is dead and no ajax response will returned. 

A touch breaks a page!!!!


> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "mindhawk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792790#action_12792790 ] 

mindhawk commented on TAP5-957:
-------------------------------

Now i have find a better way to solve this problem in which the script is move from href to onClick. The code is just like "<a onClick="javascript:show()" href='#'>show</a>".

But this only a way to avoid this problem, but it is still existed.

> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-957.
-------------------------------------

    Resolution: Won't Fix

I agree with the comment about unobtrusive JavaScript; Tapestry provides all the mechanisms necessary to deal with client-side and Ajax events in a cross-browser way. If you deliberately introduce anti-patterns into your pages, don't blame Tapestry for not reacting well.

> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "Raul Montes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888498#action_12888498 ] 

Raul Montes commented on TAP5-957:
----------------------------------

Today I found a case where this bug is triggered even when (at least from what I know) good JavaScript practices are used: when you want an anchor used only to trigger some JavaScript behaviour you could, for example, set href="#" on the link, and then observe the click event. BUT the problem with this is that the "#" character is appended to the URL on the browser (unless you stop the event, which you cannot always do). Another way (and recommended) is to set href to "javascript:void(0)", which does absolutely nothing and you can observe the click event without any problem.

The problem is that, only in IE (of course...), this "javascript:void(0)" triggers the beforeunload event (like the javascript:show() reported in this issue) so this recommended practice for "unlinked links" is not possible in Tapestry.

I created a ticket a few months ago very related to this problem (https://issues.apache.org/jira/browse/TAP5-1115). I think changing the observed event from beforeunload to just unload should fix both issues. The issue TAP5-1115 has been apparently ignored :( even when I think is a big problem: if you click a link that downloads a file without leaving the page (which is very common), any Ajax behaviour stops working because of this.

Please, at least give us feedback about what you think for both of these issues.

> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "mindhawk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792790#action_12792790 ] 

mindhawk commented on TAP5-957:
-------------------------------

Now i have find a better way to solve this problem in which the script is move from href to onClick. The code is just like "<a onClick="javascript:show()" href='#'>show</a>".

But this only a way to avoid this problem, but it is still existed.

> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "mindhawk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

mindhawk reopened TAP5-957:
---------------------------


Unobtrusive JavaScript is not the key to the problem

> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-957) Unexcept "beforeunload" event generated by ie

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-957.
-------------------------------------

    Resolution: Won't Fix

I agree with the comment about unobtrusive JavaScript; Tapestry provides all the mechanisms necessary to deal with client-side and Ajax events in a cross-browser way. If you deliberately introduce anti-patterns into your pages, don't blame Tapestry for not reacting well.

> Unexcept "beforeunload" event generated by ie
> ---------------------------------------------
>
>                 Key: TAP5-957
>                 URL: https://issues.apache.org/jira/browse/TAP5-957
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: mindhawk
>            Priority: Minor
>
> IE will generate a "beforeunload " event when a link such as "<a href='javascript:show()'>show</a>"  is clicked. So Tapestry.windowUnloaded is set to true. That means all ajax request have no chance to refresh the page after this event.
> Now, I have to set Tapestry.windowUnloaded=false, every time I want to send a ajax request. I don't think thisis a good practice. 
> I think there will be some more smart approach to replace Tapestry.windowUnloaded, or just remove it. because, the request is sent to the server no matter the value is true or false. This value is only discard the responses from the server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.