[
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.