Commit Graph

231 Commits

Author SHA1 Message Date
Dave Methvin
1d8bf0a2b5 Fix #12203. .undelegate() should not remove direcly bound events. 2012-08-07 20:49:34 -04:00
Timmy Willison
d8aa8e71b0 Sizzle: fix issue with adjusting the context on relative combinators in element-rooted qSA 2012-07-23 14:51:55 -04:00
Richard Gibson
e761e0c6e0 Support event delegation with relative selectors. Fixes #10762. Closes gh-860. 2012-07-23 12:49:45 -04:00
Richard Gibson
60e249437c Followup on #10791: "[class~=foo]" is better. Closes gh-858. 2012-07-12 10:08:24 -04:00
Richard Gibson
d67c2fd863 Wontfix #10791: please use "[class=foo]" with SVG elements 2012-07-11 17:17:47 -04:00
Mike Sherov
f5fd41252e Fix #12018, readyState "interactive" in oldIE lies! Closes gh-848. 2012-07-06 10:12:20 -04:00
Chad Killingsworth
de9bed319e Make unit tests friendly to Closure Compiler. Closes gh-845.
Conflicts:
    	test/unit/effects.js
    	test/unit/offset.js
2012-07-05 15:52:42 -04:00
timmywil
b418fa1f09 UPDATE SIZZLE: completed rewrite for better things!
Remove reverse in traversing for comma selectors. Sizzle's handling of commas is now more consistent.
2012-07-02 11:34:26 -04:00
Dave Methvin
8a01c9201a Fix #11382. #11764. Only prevent click events on disabled elements.
We don't want a disabled link/button to register delegated clicks, but we do want events like mouseover or custom events.

This is a compromise, there is no perfect solution. Well, the browsers could be consistent about direct vs. delegated events but *that's* not gonna happen.
2012-06-27 11:58:16 -04:00
Dave Methvin
94e744aec9 Fix #11315. Selector for .on() is relative to delegateTarget.
This fixes a regresssion from 1.6.4. Be aware that nearly every place that this bug comes into play, the selector in use is incredibly inefficient.
2012-06-27 11:54:04 -04:00
Dave Methvin
4df3aaeab3 Add a semicolon in unit test; this pull predated lint mandate. 2012-06-22 16:21:09 -04:00
Timo Tijhof
9bb3494ce9 Fix #11925, Pass eventHandle to special.teardown. Closes gh-831.
* Added unit test to confirm.
  The third assertion fails without the fix in ./src/event.js
2012-06-22 15:57:46 -04:00
Rick Waldron
7ff3da186c Unit tests are linted and passing. 2012-06-21 15:30:24 -04:00
timmywil
713cc86096 Move quickIs to Sizzle; Remove duplicate id matching in init; Added selector caching to Sizzle. Fixes #11826. 2012-06-18 23:10:32 -04:00
Mike Sherov
5f35b3d9f9 Fix #11857. Modularize css.js, add dependency management. Closes gh-816.
See the pull request for more info on the dependency management details.
2012-06-10 21:54:16 -04:00
Jason Moon
4757881759 Fix #11796. Preserve oldIE change delegation on clone. Closes gh-789. 2012-05-22 21:29:13 -04:00
Dave Methvin
978acb9caf Followup #11649, clean up events in unit test. 2012-05-18 17:01:17 -04:00
Jason Moon
e93f2a89e2 Fix #11649. Preserve oldIE submit flag when cloning, closes gh-772. 2012-05-18 16:34:30 -04:00
Dave Methvin
b6581df5de Fix #11621, $(document).trigger() must bubble to window. 2012-05-12 14:23:50 -04:00
jaubourg
e3cf0e220c Transform $.bindReady into $.ready.promise. It is now possible to use $.ready.promise or $.when( $.ready ) to get the ready promise. Costs *1* byte min/gzipped. Unit test added. 2012-05-06 01:05:03 +02:00
Mike Sherov
f925c7a1c9 remove jQuery.quickReady, save bytes, style nits in tests 2012-05-04 10:17:30 -04:00
Mike Sherov
54fab3174c Fix #10067. Create jQuery.quickReady; closes gh-736.
Allows us to get to the ready state sooner by not waiting for iframes to load. If that causes backcompat pain, use `jQuery.quickReady = false` as prescribed by your developer.
2012-04-23 15:44:27 -04:00
Rick Waldron
8fadc5ba01 Make test async to please Opera 11.1; supplements #11500 2012-04-16 21:42:27 -04:00
Rick Waldron
2f1ddd4507 Fix #11500. Allow triggered, simulated change events. 2012-04-10 21:54:07 -04:00
Dave Methvin
92a92be10f Fix #11049. Let bubbling submit be cancellable in oldIE. 2012-03-06 19:56:17 -05:00
Dave Methvin
633ca9c161 Fix #11076. If .clone() won't delegate, we must remediate.
Since `jQuery.event.add` can accept a handleObj there's no need to reiterate them as args, but we *do* need to set the `selector` variable correctly.
2012-01-28 16:30:35 -05:00
Dave Methvin
8d9025ca50 Fix #8165: Ignore events bubbling through disabled elements.
Although #6911 fixed the case where event.target was disabled, it missed the case where the target was a sub-element.
2012-01-19 22:14:24 -05:00
Rick Waldron
c0da49ff37 Fix #11130: Don't neglect the data arg when event-map is passed. 2012-01-12 20:30:45 -05:00
Richard Gibson
77de76b942 Fix #11145: Harden dispatch against a form-aliased "disabled" property 2012-01-11 21:56:18 -05:00
Dave Methvin
4534db196b Fix #11021. There should be no mangling of the "hover" namespace. 2011-12-13 22:29:35 -05:00
Dave Methvin
c584ce4f56 Fix #10984. Use origType when unbinding via the event object. 2011-12-13 21:40:59 -05:00
Dave Methvin
8cb065addc Fix #10844. Harden quickIs() against form-aliasing of the id property. 2011-11-21 11:33:21 -05:00
Dave Methvin
780c59b89d Fix #10791. SVG clamors for special treatment of its class names. 2011-11-16 10:35:53 -05:00
Dave Methvin
ca8fc725ac Allow mapped types to be removed by a namespace-only type name. 2011-11-15 11:38:55 -05:00
Dave Methvin
6736dd7168 Fix #10794. .triggerHandler() should not .preventDefault().
This also provides a resolution for #10699.
2011-11-15 10:23:24 -05:00
Dave Methvin
fa96f4bdee Pre-focus the element so the browser won't fire focus while we're faking it.
At this point the unit test is only testing our ability to fake-fire focusin the right way. These machinations are related to the problem in #6705.
2011-11-13 21:32:07 -05:00
Dave Methvin
d2815ed750 Disable DOM focusin test since it can't really work in the swarm. 2011-11-13 21:03:36 -05:00
Dave Methvin
683be093a6 Catch more cases where special events were incorrectly removed.
We can't take the blow-it-all-away shortcut because something in the middle of the list may be a mapped special event. On the bright side, -22!
2011-11-13 20:50:36 -05:00
Dave Methvin
774eba3388 Avoid collateral damage when removing bindType/delegateType special events. 2011-11-10 21:53:07 -05:00
Dave Methvin
5ba7f60822 Ensure the hover event doesn't match hovercraft. Witchcraft, maybe. 2011-11-10 18:05:58 -05:00
Dave Methvin
dd363d2c0f Fix #10705. Don't bail too soon in .off() event string processing. 2011-11-09 21:29:15 -05:00
Dave Methvin
39f9b846e7 Fix #10712. Deal with focus/blur morphing to focusin/focusout. 2011-11-08 23:08:04 -05:00
Dave Methvin
45101de696 Fix #10717, .trigger("load") on images can't bubble to window.
This means no manually triggered event named "load" can bubble, so avoid that name for delegated custom events.
2011-11-08 19:32:25 -05:00
Dave Methvin
90c907e8b6 Fix #10701, .preventDefault if an inline handler returns false.
Baby unicorns are slapped each time you use inline handlers, so do it sparingly.
2011-11-07 11:07:36 -05:00
Mike Sherov
f35ba5e699 Fix #10691. Remove all instances of equals() and same(), as these are deprecated in QUnit. 2011-11-06 15:27:42 -05:00
timmywil
38f087b5ae Add a way to fire native events using dispatchEvent/fireEvent in testinit.js; fixes failing click test in FF3.6 2011-10-28 14:17:14 -04:00
Dave Methvin
5c0c86378a DRY the hover pseudo-event, get the type right, allow override.
Now with working unit test for extra correctness! If external code defines a special.hover event, we won't string-hack "hover" into "mouseenter mouseleave".
2011-10-27 17:11:40 -04:00
Dave Methvin
df4a160be7 Pass correct arg list to special._default. Thanks @mikaelkaron! 2011-10-27 16:02:54 -04:00
Dave Methvin
746074f0f7 Remove attribute match from quickIs
As @timmywil points out, attributes and properties are confused by IE6/7. This commit also reworks the unit test case to do a better job of checking className matches.
2011-10-24 18:05:53 -04:00
Dave Methvin
ee3eb6cabf Fix #10567. Make sure quickIs matches correct class name. 2011-10-24 17:26:43 -04:00