Commit graph

117 commits

Author SHA1 Message Date
jeresig 328a86f9a0 Revert "Make sure that focusin/focusout bubbles in non-IE browsers." This was causing problems with the focusin event, see: #7340.
This reverts commit 88068f82c1.

Conflicts:

	src/event.js
	test/unit/event.js
2011-01-21 09:24:09 -05:00
Colin Snover e78d3a7e2d Merge in data_nocollide branch. Fixes #6968, improves unit testing framework checks for leaky stuff. 2011-01-17 15:31:43 -06:00
jeresig 987c44bee4 Merging pull request 183 for #7793. 2011-01-17 15:45:07 -05:00
Dave Methvin 007e2d152e Update test case to feature-detect Opera's lack of defaultPrevented and skip the test for it. 2011-01-15 10:24:13 -05:00
Colin Snover e2941d5a98 Update unit tests with a leak detection mechanism for the various jQuery globals and fix all leaks in the tests. 2011-01-09 15:58:47 -06:00
Colin Snover 8e59a99e0a Change the way jQuery.data works so that there is no longer a chance of collision between user data and internal data. Fixes #6968. 2011-01-09 15:52:33 -06:00
Colin Snover 3e0cc81504 Clean trailing whitespace from all files. 2010-12-30 00:34:48 -06:00
Dave Methvin 64ee5581af When a native browser event is bubbling up the DOM, make sure that the correct isDefaultPrevented value is reflected by jQuery's Event object. Fixes #7793. 2010-12-27 13:30:05 -06:00
Dave Methvin b8931f7448 Test for standard createEvent before IE-specific click method.
Don't fallback to fake click; let's see which browsers fail, if any.
2010-12-27 12:43:48 -05:00
Dave Methvin 0b6afcedd2 When a native browser event is bubbling up the DOM, make sure that the correct isDefaultPrevented value is reflected by jQuery's Event object. Fixes #7793. 2010-12-23 19:59:23 -05:00
Anton M 89b771daef Make sure custom events named "submit" can be bound to non DOM elements in IE too. Fixes 6398. 2010-11-21 04:31:04 +01:00
dmethvin 974b5aeab7 Honor stopImmediatePropagation for live/delegate event handlers. Fixes #7217. 2010-10-25 13:05:31 -07:00
rwldrn 3b50eaca2c Fixes #7229 and #5803 2010-10-24 12:18:33 -04:00
jeresig 0564553bf1 Fix the number of change tests and remove textarea tests. 2010-10-14 22:37:56 -04:00
jeresig 2d5f8666ac Use prepend for the focuin test (to avoid making the test suite jump). 2010-10-14 21:40:35 -04:00
Justin Meyer 88068f82c1 Make sure that focusin/focusout bubbles in non-IE browsers. 2010-10-13 10:35:28 -04:00
John Resig 2ef8da0924 Merge branch 'bug7150' of http://github.com/csnover/jquery 2010-10-12 21:51:44 -04:00
John Resig 783bb2a85f Fix some gaps in the handling of event data properties. Thanks to @jitter in ff6ceadbfd for the catches. 2010-10-12 20:56:46 -04:00
Colin Snover 1518ae1aed Fix patch for #7150, which was not deleting the events object properly on plain JS objects. Thanks to jitter for catching it. 2010-10-12 18:49:37 -05:00
Colin Snover ff6ceadbfd Use a key name less likely to result in collisions for events on plain JS objects. Fixes bug #7150. 2010-10-11 23:35:18 -05:00
John Resig 1df5084c97 Handle some edge cases with binding events to the window object (which is also a plain object - causing some confusion). Fixes #7143. 2010-10-11 18:20:57 -04:00
John Resig c00a6ff1f1 Add some resize event tests. 2010-10-11 18:03:54 -04:00
Dave Reed cb811c04b0 Using data() on JavaScript objects sets fields directly on the object. Note that events are now a property of a function (to avoid JSON serialization - and only in the case of JavaScript objects, not DOM nodes). Fixes #6807. 2010-09-29 06:46:25 -07:00
John Resig 49f6f34181 Fix number of expected select tests from commit 879799fe95. Thanks to @jitter for the catch. 2010-09-29 05:41:27 -07:00
Dave Methvin 2c4b20809e Don't have .val() return selected-but-disabled options, or selected options inside a disabled optgroup. Doesn't change the .val() returned for a disabled select. Fixes #3240, adapted from Nathan Hammond's patch there. 2010-09-24 17:26:22 -04:00
Robert Katic 7367b524ec Ensure that selector is not broken. 2010-09-23 12:08:29 -04:00
Robert Katic dc4c9abc39 Correcting some imperfections in test added in previous commit. 2010-09-23 12:08:15 -04:00
Robert Katic da5706c974 Added support for map of events in live, die, delegate and undelegate. Fixes #6282. 2010-09-23 12:07:42 -04:00
jeresig 1ba2df02d6 Use custom events for testing unbind instead of the, potentially conflicting, error event. 2010-03-24 15:39:58 -04:00
jeresig da26d0eb4e Rewrote the live/delegate submit tests to be more generic. 2010-03-09 14:08:33 -05:00
jeresig f68b46d7ab Make sure that special remove and teardown events get called when .die() is used. Additionally made sure that default actions are triggered when namespaced events are used. Fixes #6202 and #6250. 2010-03-09 12:22:25 -05:00
jeresig 9584e908a2 Added in Ben Alman's proposed event.namespace property (the property holds the namespaces specified in a call to trigger). Additionally fixes namespaces with .live(). Fixes #6208 and #6209. 2010-03-02 17:34:12 -05:00
jeresig 5c111a028a We no longer support globally-triggered events on plain objects. This is a trade-off to having good garbage collection on the objects. 2010-03-02 10:51:31 -05:00
jeresig a45372a4c5 Adding in .bind(name, false), .unbind(name, false) support - an easy way to just stop bubbling and the default action on an element. Fixes #6188. 2010-02-27 09:02:13 -05:00
jeresig ba7195e3f9 Make it so that you can pass in event data to .click(), et. al. Fixes #6187. 2010-02-26 20:01:19 -05:00
jeresig 7f5179b654 Make sure that unbinding on a plain javascript object works correctly. Fixes #6184. 2010-02-26 11:32:12 -05:00
jeresig 26b0e913dd Make sure that live events bubble unless explicitly told not to, like a normal event. Fixes #6182. 2010-02-26 09:26:14 -05:00
jeresig da966573c3 Make sure that elements that have been removed also have their special events cleaned up. Fixes #6084. 2010-02-13 06:10:43 -05:00
jeresig dd5c26304a Make sure that live focus and blur events also bind to the regular events, to handle triggered events. Fixes #6055. 2010-02-13 05:37:17 -05:00
John Resig 021b809ace Make sure that the teardown is called after all the handlers of a type are removed. Fixes #6065. 2010-02-11 01:42:51 -05:00
jeresig be2407e233 Rewrote the live event handling to use the new event logic. Also added in support for live namespaced events. Fixes #5945. 2010-02-04 21:36:32 -05:00
jeresig 104757705a Added some more tests for checking the execution order of events (from last night's changes - routes around Chrome's busted object looping abilities). 2010-02-04 09:23:50 -05:00
Justin Meyer e177465a6b Forgot to land Justin's tests for the event fixes. 2010-02-04 00:49:46 -05:00
jeresig e7912805d6 A large refactor of the event handling logic. Data and namespace information is maintained in a separate object now, no longer on the event handler. Proxy functions are no longer needed, as a result. Additionally execution order of the handlers is maintained, fixing #4261, and the execution of handlers is maintained even while they're being removed. Live events will be refactored separately. 2010-02-04 00:20:52 -05:00
jeresig 31432e048f Add .delegate() and .undelegate(). An alternative to using .live() which goes from a single root and filters by the specified selectors. Should be used like do: .delegate(td, hover, someFn);. Fixes #6005. 2010-02-01 18:06:03 -05:00
jeresig 0252b78201 Provide a way to simulate default browser actions. Fixes #5973. 2010-01-28 14:34:09 -05:00
jeresig 390186b902 Make sure that special.add actually copies over event namespaces and data. Fixes #5779 and #5834. 2010-01-25 17:01:07 -05:00
jeresig 0474917c9d Make sure multiple bound events have their namespaces and data maintained. Fixes #3549. 2010-01-25 16:45:39 -05:00
jeresig d24443fb55 Make sure that it's possible to preventDefault natively-triggered (submit, focus, blur, click) events. Fixes #5695. 2010-01-25 13:45:07 -05:00
jeresig 3e286440d5 Make sure that .die() with no args works. Fixes #5789. 2010-01-23 16:37:12 -05:00