rails/jquery-ujs — pull request #362 by pekeler (2014-03-03 04:01:42+00:00)
Title: fix for disabling non-remote links

Fixes #306, probably also fix #355.

Non-remote links' default handler is now slightly delayed so that browsers repaint the link with their new disable text/status (this is an issue in Safari and Chrome). This change also fixes an issue in IE where a link with a disable-with attribute around a div doesn't perform the default event handler. As a side effect of this change, calling .trigger('click') on a link will now actually change the window's location - changed a fixture and a test to deal with this.

#361 demonstrates the two problems which are fixed by this change.

If you don't like the changes to the tests, we could alternatively overwrite $.rails.followLink to not do anything during the unit tests.

I ran the unit tests with random jQuery versions (mostly 1.11.0, though) successfully (except for #359) in:
Safari 7, OSX 10.9
Firefox 27, OSX 10.9
Chrome 33, OSX 10.9
IE11, Win8.1 (emulated)
IE10, Win8 (emulated)
IE9, Win7 (emulated)
IE8, Win7 (emulated)
IE7, Vista (emulated)

I tested my Rails app with this change and jQuery 1.11.0 successfully in
Mobile Safari 7, iOS 7
Android Browser 4.3 (emulated)
Android Browser 4.0.3 (emulated)
Safari 7, OSX 10.9
Firefox 27, OSX 10.9
Chrome 33, OSX 10.9
IE11, Win8.1 (emulated)
IE10, Win8 (emulated)
IE9, Win7 (emulated)
IE8, Win7 (emulated)
IE7, Vista (emulated)