This project is archived and is in readonly mode.
IE7 does not respect "return false;" in onclick
Reported by Rusty Burchfield | March 10th, 2009 @ 07:39 PM | in 2.x
Source:
http://github.com/rails/rails/bl...
when confirm && popup
"if (#{confirm_javascript_function(confirm)}) { #{popup_javascript_function(popup)} };return false;"
when confirm && method
"if (#{confirm_javascript_function(confirm)}) { #{method_javascript_function(method)} };return false;"
when confirm
"return #{confirm_javascript_function(confirm)};"
when method
"#{method_javascript_function(method, url, href)}return false;"
when popup
"#{popup_javascript_function(popup)}return false;"
IE7 requires the following.
http://dev.rubyonrails.org/brows...
event.returnValue = false;
References:
http://www.ontola.com/javascript...
http://dev.rubyonrails.org/brows...
Comments and changes to this ticket
-
Rusty Burchfield March 18th, 2009 @ 05:53 PM
- no changes were found...
-
Zach Brock April 28th, 2009 @ 05:02 AM
- Tag changed from :confirm, :method, :popup, ie7, link_to to :confirm, :method, :popup, ie7, link_to, patch
This looks like a good fix to an IE7 specific bug. +1
-
Matt Jones May 10th, 2009 @ 10:50 PM
Just tried this against IE7 and couldn't reproduce. This appears to be a problem with certain BHOs that muck around with event handling, notably FlashGet and some phishing filters. (see this discussion for more info)
Also note that, in general, the code being generated in that part of url_helper is going straight into an onclick handler, where event isn't even defined in all browsers. (Firefox, for instance)
-
Pratik August 9th, 2009 @ 01:57 AM
- State changed from new to invalid
Please reopen if this is still an issue.
-
Sam Saffron January 25th, 2010 @ 04:26 AM
Cowboys, I just lost 2 hours of my time to this stupid bug, I can confirm this happens in ie8. I can also confirm this patch fixes it.
Please accept this patch.
-
Sam Saffron January 25th, 2010 @ 05:08 AM
This happens due to a bug in jquery 1.4 release !! assuming it was around in other forms due to similar javascript hackery.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>