Dave Methvin
6ece8f138f
Revert "Fix #6593 . Don't trigger change
event twice when simulating it on IE." Add inline handler monitor to delegatetest.html so we can see it fail.
...
This reverts commit e77686495b6e34938575c9c0fe978cb4a0be6f05.
2011-09-19 15:42:32 -04:00
Dave Methvin
6c618ddb0d
Eliminate global variable "l" (!)
2011-09-19 15:42:32 -04:00
Dave Methvin
06e56acb0d
Narrow the invisible-element embargo to focus/blur events.
2011-09-19 15:42:32 -04:00
Dave Methvin
4030de9519
Update "Fix #6593 . Don't trigger change
event twice when simulating it on IE."
...
This reverts commit 3d0de29d5615c1b1d74c72e6272484961a4ba243.
2011-09-19 15:42:32 -04:00
Dave Methvin
8c91da57b9
Fix #9593 . Create a new jQuery.Event rather than a plain object when simulate()ing events. Fix a related issue with not passing src to jQuery.Event constructor.
2011-09-19 15:42:32 -04:00
Dave Methvin
619a89d5ff
Fix #6593 . Don't trigger change
event twice when simulating it on IE.
2011-09-19 15:42:31 -04:00
Dave Methvin
6872d31f5a
Fix #6170 . Don't try to run DOM methods on window
.
2011-09-19 15:42:31 -04:00
Dave Methvin
38601e07da
Remove the relatedTarget adjustment for mouseenter/leave events, it's an ambiguous case anyway and it is expensive to do.
2011-09-19 15:42:31 -04:00
Dave Methvin
2886249e84
Cosmetic and style cleanups.
2011-09-19 15:42:31 -04:00
Dave Methvin
0ec71ac707
Fix the special event handler for mouseover/out events.
...
And use the /dist version of jquery.js, willya?
2011-09-19 15:42:31 -04:00
Dave Methvin
9aa553aa18
Rework #1486 patch to avoid try/catch
and look for hidden elements by .offsetWidth
. Unit test currently disabled due to Chrome bug.
2011-09-19 15:42:31 -04:00
Dave Methvin
ecd10464e8
Fix #9951 . Precompute path for .trigger()
to match up with W3C spec.
2011-09-19 15:42:31 -04:00
Dave Methvin
0ccb88d48d
Fix some messy rebasing issues.
2011-09-19 15:42:31 -04:00
Dave Methvin
005958b731
Fixes for IE8. Avoid killer recursion in special events during removal. Use q instead of quote in unit tests.
2011-09-19 15:42:31 -04:00
Dave Methvin
9038aa9586
The unload event no longer needs the IE6SP2 fix, see http://bugs.jquery.com/ticket/8982
2011-09-19 15:42:31 -04:00
Dave Methvin
68d07bf648
Clean up the delegate matching logic.
2011-09-19 15:42:31 -04:00
Dave Methvin
66e9a6f773
Make a blur
event bubble properly when mutated into a focusout
event.
2011-09-19 15:42:31 -04:00
Dave Methvin
8a6bbc70d0
Remove redundancy in the IE special submit handler.
2011-09-19 15:42:31 -04:00
Dave Methvin
bd55f905a0
Fix simulate() arg order.
2011-09-19 15:42:31 -04:00
Dave Methvin
bb1081ee44
Clean up the quick selector expression parsing code.
2011-09-19 15:42:31 -04:00
Dave Methvin
990c094f1c
special.handle now must call the handleObj.handler if it wants that to happen. Also re-use the simulate() function for bubbling focusin.
2011-09-19 15:42:31 -04:00
Dave Methvin
6a670df9e9
Rework the special events interface to add handle and trigger hooks. Modify IE change/submit special events to take advantage of them. Rewrite mouseover/enter code as special events rather than inline code. In the event unit test, set a tabindex on the div element and focus it first to justify a legitimate blur event.
2011-09-19 15:42:31 -04:00
Dave Methvin
df6e0d508e
Rewrite IE special change/submit to make it faster/shorter. Fixes #6319 .
2011-09-19 15:42:31 -04:00
Dave Methvin
0dc7b16e94
Fixes #8858 . Pass the .trigger(..., data) to the event.special._default method.
2011-09-19 15:42:31 -04:00
Dave Methvin
d74c6bd0f4
Add unit tests for quickIs cases and fix the regexp as a result.
2011-09-19 15:42:31 -04:00
Dave Methvin
03f99ff995
Pre-compute delegated event path and handlers to comply with http://www.w3.org/TR/DOM-Level-3-Events/#event-flow
2011-09-19 15:42:30 -04:00
Dave Methvin
5d6a1424aa
jQuery 1.7 event work:
...
Add .on() and .off() methods.
Write existing methods in terms of on/off.
Rewrite delegated handling to remove "live" event.
Fix existing code for jQuery style guide.
Fix existing bug in unit tests calling .undelegate()
2011-09-19 15:42:30 -04:00
Dave Methvin
81c778b2ca
Fix #10208 . Check for button
as well as input
when performing the #7071 VML crash workaround for IE special-events submit code.
2011-09-07 11:30:22 -04:00
Steen Nielsen
2d275dfd05
Make sure that Internet Explorer 6-8 won't give a "failed" error, when a request for type is made on vml objects
2011-07-15 22:21:44 +02:00
rwldrn
6926247bf4
Landing pull request 397. withinElement rewrite in event. Fixes #6234 , #9357 , #9447 .
...
More Details:
- https://github.com/jquery/jquery/pull/397
- http://bugs.jquery.com/ticket/6234
- http://bugs.jquery.com/ticket/9357
- http://bugs.jquery.com/ticket/9447
2011-06-14 15:38:46 -04:00
rwldrn
c3c001cf5b
Landing pull request 404. Removes unused hasOwn var declaration. Fixes #9510 .
...
More Details:
- https://github.com/jquery/jquery/pull/404
- http://bugs.jquery.com/ticket/9510
2011-06-06 20:16:14 -04:00
Rick Waldron
c17f589ec9
Landing pull request 377. Check custom data != null(undefined), allows zero; Fixes #9285 .
...
More Details:
- https://github.com/jquery/jquery/pull/377
- http://bugs.jquery.com/ticket/9285
2011-05-16 10:38:36 -04:00
John Resig
419b5e5e2a
Make sure that mouseenter/mouseleave fire on the correct element when doing delegation. Fixes #9069 .
2011-05-10 11:49:32 -04:00
Rick Waldron
bf678fd9d6
Restores var names to satisfy the crock-machine. Supplements #9008
2011-04-28 22:26:34 -04:00
Rick Waldron
ca367674c1
Restored /g flag to rspaces; Adds unit tests; Supplements #9008
2011-04-28 21:15:45 -04:00
rwldrn
57f56be04f
Make cached rspaces regex definitions consistent. Fixes #9008
2011-04-28 16:06:13 -04:00
Jordan Boesch
02ad0aa3b6
Landing pull request 344. using jQuery.nodeName where applicable.
...
More Details:
- https://github.com/jquery/jquery/pull/344
2011-04-23 17:58:56 -04:00
Dave Methvin
16312c6b06
Merge branch 'master' of github.com:jquery/jquery into fix-8790a-quicker-trigger
2011-04-21 22:15:21 -04:00
Rick Waldron
8d3754751d
DRY out #6514
2011-04-17 15:29:49 -07:00
Brian Brennan
3cb9c1835c
Fix live mouseenter and mouseleave binding so they can be activated by triggers. Fixes #6514 .
2011-04-17 18:17:31 -04:00
Gilmore Davidson
a9b81d759a
Added check for live mouseenter/mouseleave events if bound to nested elements with the same selector. Fixes #5884 .
2011-04-17 10:34:38 -07:00
John Resig
adef5c3550
Make sure that there isn't an error if no event object exists. Fixes #8755 .
2011-04-17 10:21:46 -07:00
Dave Methvin
235080e125
Follow-up to #8790 . Delay the creation of a jQuery.Event until we know it will need to be triggered.
2011-04-16 20:48:27 -04:00
John Resig
6e3b596514
Allow function to be passed in as a data object to bind and one. Fixes #6993 .
2011-04-16 17:37:35 -07:00
timmywil
149a040794
Fix test suite fail in IE6/7 on event:undelegate - was failing an if where it shouldn't
2011-04-13 23:14:14 -04:00
Dave Methvin
bebd8bc01e
Followup to #8753 . Modify new Event constructor signature to jQuery.event(type, props), which can be exploited by jQuery.event.trigger as well.
2011-04-12 19:29:09 -04:00
Dave Methvin
6d49e84daf
Merge branch 'fix-8790-quick-trigger'
...
Conflicts:
src/event.js
2011-04-12 18:46:21 -04:00
Dave Methvin
9e71ad1b12
Explicitly set event.type in case we chopped out a namespace or exclusive flag.
2011-04-12 18:32:23 -04:00
Dave Methvin
352715bd08
Use explicit "new jQuery.Event" to avoid double-function-call overhead.
2011-04-12 17:46:15 -04:00
John Firebaugh
0d8b247cab
Accessing the 'type' property on VML elements fails on IE. Fixes #7071 .
2011-04-12 16:48:22 -04:00
John Resig
978c065555
Merge branch 'Sub_Naming' of https://github.com/timmywil/jquery into timmywil-Sub_Naming
...
Conflicts:
src/core.js
src/css.js
src/event.js
2011-04-12 16:05:40 -04:00
John Resig
e7787cd098
More formatting tweaks.
2011-04-12 15:54:30 -04:00
John Resig
34adda3c88
Fixing some minor formatting problems.
2011-04-12 14:58:55 -04:00
John Resig
b05d631b30
Merge branch 'fix-8790-quick-trigger' of https://github.com/dmethvin/jquery into dmethvin-fix-8790-quick-trigger
2011-04-12 14:57:30 -04:00
jeresig
7bfb6a7dd3
Removing un-needed frameElement check as discussed in #8018 . Fixes #8108 .
2011-04-12 00:29:52 -04:00
Dave Methvin
7fa6de0ec1
Merge branch 'master' of github.com:jquery/jquery into fix-8790-quick-trigger
2011-04-11 13:25:57 -04:00
Dave Methvin
a5071d49ba
Shave some time off array setup in trigger/handle
2011-04-11 13:19:00 -04:00
jeresig
094c48e0c5
Merge branch '8777' of https://github.com/rwldrn/jquery into rwldrn-8777
...
Conflicts:
src/event.js
2011-04-11 12:13:04 -04:00
Dave Methvin
7957516671
Merge branch 'master' of github.com:jquery/jquery into fix-8790-quick-trigger
...
Conflicts:
src/event.js
2011-04-11 11:44:26 -04:00
Rick Waldon
868e1e28ce
Ticket #8753 Always set event type explicitly
2011-04-11 11:32:23 -04:00
Dave Methvin
530c915553
Move initialization of event until we determine if anyone wants it.
2011-04-11 11:15:00 -04:00
Dave Methvin
bb52010442
Merge branch 'master' of github.com:jquery/jquery into fix-8790-quick-trigger
2011-04-10 17:40:31 -04:00
jeresig
14ecd9a992
Merge branch 'proxy-native-bind' of https://github.com/gf3/jquery into gf3-proxy-native-bind
2011-04-10 16:51:22 -04:00
jeresig
2c74ee46ee
Merge branch 'eventprops.1.6final' of https://github.com/rwldrn/jquery into rwldrn-eventprops.1.6final
...
Conflicts:
test/unit/event.js
2011-04-10 16:28:15 -04:00
Dave Methvin
98d83ef85f
Fixes #8722 . Remove try/catch used by #3533 to fix the IE Table Colon Blow bug, and instead check for colon in the event name. Thanks to daguej for scoping this out -- a colonoscopy you might say.
2011-04-07 22:52:15 -04:00
Dave Methvin
2f11ba7c98
Allow specific custom events to exit trigger early if there are no handlers bound for that type.
2011-04-06 23:41:47 -04:00
Dave Methvin
bbd9c776ea
Fix #8732 . Change feature detect for focusin event support, so IE9 won't have duplicate events.
2011-04-06 23:06:52 -04:00
Dave Methvin
b7dd8404c5
Fixes #8712 . Bubble custom events to the window when they are triggered. Ride that, Cowboy!
2011-04-06 22:11:58 -04:00
Dave Methvin
879be3d812
Fix some spacing and comment issues that crept in with the rebase.
2011-04-06 11:34:41 -04:00
Dave Methvin
29386db319
Sadly, we still have to bubble the event so inline handlers will work.
2011-04-06 10:57:09 -04:00
Dave Methvin
246757bacd
Only bubble a triggered event if we have attached a jQuery handler, but check the current element for an inline handler regardless. Make some other size optimizations as well.
2011-04-06 10:57:07 -04:00
Dave Methvin
bfa32317d2
Switch from recursion to iteration for event triggering. Move event-name namespace processing out of event handler, since it has to always go through trigger.
2011-04-06 10:50:31 -04:00
Dave Methvin
c1316a4cb1
Shorten up the code and do event cleanup on test cases.
2011-04-05 21:59:09 -04:00
Dave Methvin
b5c7c507c1
Merge branch 'ticket_7883' of https://github.com/rwldrn/jquery into rwldrn-ticket_7883
2011-04-05 21:42:58 -04:00
rwldrn
4b0c26f0af
Ticket #8777 undelegate by namespace
2011-04-05 18:55:07 -04:00
rwldrn
92a4d59c32
Remove this.type assignment
2011-04-05 16:32:42 -04:00
rwldrn
b1b2e83394
Move this.type setting to after prop set; avoid setting twice
2011-04-05 16:20:55 -04:00
rwldrn
23a411b6bc
Ticket #8753 Allow special properties to explicitly defined on jQuery.Event objects
2011-04-05 15:55:40 -04:00
jeresig
7705c35b14
Merge branch 'fix-8456-lost-mouseenter' of https://github.com/dmethvin/jquery into dmethvin-fix-8456-lost-mouseenter
2011-03-21 10:53:57 -04:00
Dave Methvin
2ac4067a63
Fixes #8456 . Make sure parent is not null before crawling into its lap, so mouseenter is triggered on a mouseover event.
2011-03-09 22:38:26 -05:00
Dave Methvin
55ec6a71d2
Fixes #7340 . Use a single capturing handler to simulate bubbling focusin/focusout event on non-IE browsers. Allow native DOM methods to fire events other than the currently active one back into jQuery.
2011-03-04 21:16:40 -05:00
Dan Heberden
47abe5e1da
Bug #6911 - Prevent action on disabled elements, both triggering and bound via .live()
2011-02-18 10:09:07 -08:00
Alex Sexton
752db8fffe
A temporary workaround for #8018 that avoids any chance of compatibility-breaking changes until a proper fix can be landed in 1.6.
2011-02-17 18:01:30 -06:00
Anton M
6b08d88d04
Fix some whitespace issues.
2011-02-15 22:09:09 +01:00
Dave Methvin
12c0e1a692
Fixes #7922 . Copy the donor event when simulating a bubbling submit in IE so that we don't accidentally stop propagation on it. Remove a bunch of return statements that could also cancel the event. DRY out the liveFired change from #6359 by moving it to the trigger() function.
2011-02-15 22:08:39 +01:00
Anton M
b46dff39c3
Make sure that mousing over Chrome "internal div" doesn't trigger a mouseleave. Fixes #8209 .
...
Follow up to 4a828c93d4
which was stupid and got reversed.
2011-02-08 17:15:55 +01:00
Anton M
944e0e6498
Revert "Make sure that mousing over Chrome "internal div" elements results in no trigger of a mouseleave."
...
This reverts commit 4a828c93d4
.
2011-02-08 17:08:25 +01:00
Anton M
4a828c93d4
Make sure that mousing over Chrome "internal div" elements results in no trigger of a mouseleave. Fixes #8209 .
2011-02-08 16:57:06 +01:00
Colin Snover
7acb141ed7
Update $.data to use a function instead of an object when attaching to JS objects in order to hide attached metadata from JSON.stringify. Remove event.js code that was doing this before specifically for events, which is now redundant. Fixes #8108 . 1.5-stable
2011-02-07 10:48:38 -06:00
Timmy Willison
82626799ca
Changed $.sub internals to match sub naming, added some more spacing in some areas for readability
2011-02-06 19:34:57 -05:00
Gianni Chiappetta
a03f040dbf
Merge branch 'master' into proxy-native-bind
...
* master: (194 commits)
Revert "Make sure that focusin/focusout bubbles in non-IE browsers." This was causing problems with the focusin event, see: #7340 .
Replaces "text in-between" technique with a full-fledged one-level transitive search for converters (unit tests added). Also cleans up auto dataType determination and adds converter checks in order to guess the best dataType possible.
Moves determineResponse logic into main ajax callback. Puts responseXXX fields definitions into ajaxSettings.
Removes misleading comment.
Bring jQuery('#id') and jQuery('body') logic back into core (while leaving it in Sizzle at the same time). Was causing too much of a performance hit to leave it all to Sizzle.
Renames Deferred's fire and fireReject methods as resolveWith and rejectWith respectively.
Fix typo in regex tweak from previous commit.
Renames determineDataType as determineResponse. Makes it more generic as a first step into integrating the logic into the main ajax done callback. Also fixes some comments in ajax/xhr.js.
Move jQuery(...) selector speed-up logic into Sizzle(...) qSA handling. Additionally add in a new catch for Sizzle('.class') (avoid using qSA and use getElementsByClassName instead, where applicable).
Revises the way arguments are handled in ajax.
Makes sure statusCode callbacks are ordered in the same way success and error callbacks are. Unit tests added.
Cleans up and simplifies code shared by ajaxPrefilter and ajaxTransport. Removes chainability of ajaxSetup, ajaxPrefilter and ajaxTransport. Also makes sure context is handled properly by ajaxSetup (unit test added).
Rework unit tests to check actual result elements.
Moves active counter test after all other ajax tests where it should be.
Revised the Nokia support fallback. It turns out that Nokia supports the documentElement property but does not define document.compatMode. Adding this third fallback allows Nokia to run jQuery error-free and return proper values for window width and height.
Moves things around to make jsLint happier.
Fixes crossDomain test so that it assumes port to be 80 for http and 443 for https when it is not provided.
Moves determineDataType into ajaxSettings so that it is accessible to transports without the need for a second argument and so that we can now pass the original options to the transport instead. Also ensures the original options are actually propagated to prefilters (they were not).
Re-adds hastily removed variable and simplifies statusCode based callbacks handling.
Use undefined instead of 0 to deference transport for clarity.
...
Conflicts:
src/event.js
2011-01-21 09:58:55 -05:00
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
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
rwldrn
612a908514
#7883 .delegate and .live should accept false as the fn arg, like bind
2011-01-01 13:49:59 -05:00
Colin Snover
429b078dc7
Merge branch 'fix7762' into jquery master. Fixes #7762 .
2010-12-30 00:02:56 -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
Colin Snover
37d297c67f
Clearing event handlers on unload is no longer necessary in any version of IE. This issue causing memory leaks between pages was fixed in MS07-033.
2010-12-26 14:28:49 -06:00
Colin Snover
a939ade9c6
Fix whitespace in event.js
2010-12-26 14:28:13 -06:00