Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #306, probably also fixes #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)