Commit Graph

368 Commits

Author SHA1 Message Date
Timmy Willison
dabd5ba96c Core: use interactive to evaluate dom ready, barring IE9-10
Fixes gh-2100
2015-10-29 10:21:50 -04:00
Oleg Gaidarenko
d92310050c Event: fix incorrect test
Which was revealed by 03eaadb131 commit,
also do not try to fix typos in data/jquery version
2015-10-12 18:37:04 +03:00
Gary Ye
03eaadb131 Tests:Docs: Fix various typos
* Changes "baar" to "bar" when used with "foo" in readme
  and comments of js files

* mousenter -> mouseenter

Thanks @garysye, @KimTaehee

Closes gh-2613
Closes gh-2601
2015-10-12 18:08:13 +03:00
Michał Gołębiowski
64fd7ef3d0 Tests: Account for Edge in originalEvent UA-sniffs
All other cases where Edge user agent needed to be taken into account
in tests have already been resolved.

Fixes gh-2357
2015-09-14 21:13:44 +02:00
Jason Bedard
0e982433eb Data: avoid using delete on DOM nodes
Closes gh-2479
2015-09-08 20:22:54 +02:00
Oleg Gaidarenko
c161eecce0 Tests: more style corrections
Provocated by jscs-dev/node-jscs@2de68c0d83

Closes gh-2578
2015-09-08 04:06:20 +03:00
Oleg Gaidarenko
c8d15a2f9f Tests: further improvements QUnit 2.0 migration
* Remove QUnit jshint globals
* Extend QUnit.assert methods
* Use assert.async instead of start/stop/done

Ref b930d14ce6
2015-09-08 04:06:20 +03:00
Oleg Gaidarenko
10fdad742a Build: Update jscs and lint files
Fixes gh-2056
2015-09-07 20:03:50 +03:00
Oleg Gaidarenko
b930d14ce6 Tests: partially use new qunit interface
http://qunitjs.com/upgrade-guide-2.x/

For most of the boring work was used
https://github.com/apsdehal/qunit-migrate package

However, it can't update local qunit helpers, plus in some places
old QUnit.asyncTest signature is still used

Fixes gh-2540
2015-08-16 09:02:01 +03:00
Richard Gibson
9d820fbde6 Event: Only check elements for delegation matches
Closes gh-2529
Ref trac-13208
(cherry picked from commit fc2ba2e136)
2015-08-10 10:26:13 -04:00
Oleg Gaidarenko
aabe94edb4 Tests: don't use deprecated argument in test declaration
Closes gh-2507
2015-07-30 20:46:31 +03:00
Bruno Pérel
360a478033 Docs: Fix various spelling mistakes
Closes gh-2487
2015-07-30 15:47:23 +02:00
Oleg Gaidarenko
6df669f0fb Event: remove outdated originalEvent hack
Closes gh-2335
Ref 7475d5debe
2015-05-29 20:32:59 +03:00
Gabriel Schulhof
7475d5debe Event: Remove fake originalEvent from jQuery.Event.simulate
Fixes gh-2300
Closes gh-2303
2015-05-29 19:56:06 +03:00
Oleg Gaidarenko
0705be4750 Event: remove deprecated event aliases
Fixes gh-2286
Closes gh-2287
Ref trac-11733
2015-05-19 13:43:34 +03:00
Timmy Willison
56bb677725 Data: remove the expando when there's no more data
Fixes gh-1760
Close gh-2271
2015-05-12 10:09:40 -04:00
Oleg Gaidarenko
fac67a9842 Event: remove guard for falsy handler argument of jQuery#on method
Since we don't have this in off method and its a common perception
that this is a rudiment code

Ref gh-2248
Closes gh-2249
2015-05-03 13:28:27 +03:00
Dave Methvin
d7e5fcee51 Event: HTML5 drop events inherit from MouseEvent
Fixes gh-2009
Ref gh-1925
2015-01-14 14:34:09 -05:00
Aditya Raghavan
97cf528082 Event: Normalize mouse event properties in drag events
DragEvent is a superset of MouseEvent, so we want to fix up mouse
properties like pageX and pageY.

Fixes gh-1925
2015-01-05 15:34:52 -05:00
Dave Methvin
8653068dd6 Event: Empty namespaces should be uneventfully ignored
Thanks @hamishdickson for the report!

Closes gh-1769
2014-12-09 19:59:56 -05:00
Veaceslav Grimalschi
4467ed606a Event: Fully clean up events in unit test
Closes gh-1685
2014-12-07 21:28:20 -05:00
Dave Methvin
d9ed166c86 Event: Copy detail property to jQuery.Event on native events
Fixes gh-1867
2014-12-03 15:56:50 -05:00
Michał Gołębiowski
c309b95756 Misc: Adjust comments & docs to dropping IE<8 in jQuery Compat 2014-11-04 16:16:36 +01:00
Michał Gołębiowski
740e190223 Misc: Drop support for older browsers; update support comments
That includes Opera 12.x, Firefox<29, Safari<6.0 and some hacks
for old Blackberry.

Closes gh-1820
Refs gh-1815
2014-11-03 18:37:26 +01:00
Daniel Herman
b807aedb7f Event: Restore the constructor property on jQuery.Event prototype
The original definition of the jQuery.Event prototype was paving over the
`constructor` property which was causing jQuery.isPlainObject to
improperly report that an instance of jQuery.Event was a plain object.

Fixes #15090
Closes gh-1580
2014-09-04 03:28:40 -04:00
Michał Gołębiowski
55c196e837 Event: Simplify the logic behind blacklisting Android 2.3 on one test 2014-03-18 20:59:33 +01:00
Michał Gołębiowski
14e0a632a0 Event: Don't test stopImmediatePropagation in Android 2.3
Android 2.3 doesn't support stopImmediatePropagation; jQuery fallbacks
to stopPropagation in such a case.
2014-03-18 20:55:50 +01:00
Dave Methvin
472f70a9df Event: Unit test for #14741 fix
Fixes #14741
Closes gh-1503
2014-03-16 10:54:12 -04:00
Dave Methvin
6a89db86ed Event: Call underlying stopImmediatePropagation when present
Fixes #13997
2014-03-12 21:11:26 -04:00
Dave Methvin
06adf7c95d Event: Allow triggerHandler(beforeunload)
Fixes #14791
2014-03-04 20:49:57 -05:00
Michał Gołębiowski
6d2ab64df7 Event: Blacklist the onbeforeunload test in Android 2.3
Similarly to iOS, Android 2.3 has the onbeforeunload property on window
but doesn't support the event. This commit blacklists the test there as well.
2014-02-13 16:00:30 -08:00
Michał Gołębiowski
988d99ad27 Tests: Blacklist beforeunload test in iOS
iOS has the window.onbeforeunload field but doesn't support the beforeunload
handler making it impossible to feature-detect the support.

Fixes #14717
Closes gh-1496
2014-01-26 04:07:27 +01:00
Dave Methvin
c2aca17d45 Ref #14180, let focusin/out work on non-element targets. 2013-11-14 16:33:12 -05:00
Dave Methvin
1cecf64e5a Fix #14180. Allow cross-frame use of focusin/out. Close gh-1369. 2013-11-12 21:15:08 -05:00
Michał Gołębiowski
4b39a82890 Fix #14340. Remove remnants of oldIE from unit tests. Close gh-1425. 2013-11-11 00:43:27 +01:00
Oleg
45be91e398 Don't execute focus tests in Firefox
Close gh-1423
2013-11-08 16:00:30 +01:00
Dave Methvin
eca79fbf5b Revert "Fix #14180. Allow cross-frame use of focusin/out. Close gh-1369."
This reverts commit 9b6f074580.
2013-10-22 22:49:03 -04:00
Dave Methvin
9b6f074580 Fix #14180. Allow cross-frame use of focusin/out. Close gh-1369. 2013-10-22 22:03:20 -04:00
Dave Methvin
3bcd04f528 Fix #13993. Save result of native inline handlers. Close gh-1368. 2013-10-06 17:43:54 -04:00
Oleg
2c0b9027de Add setup function for the event module 2013-09-30 21:12:58 +04:00
Oleg
0a62e22579 Focus on the body before running focus test
(cherry picked from commit b2f27632eb)
Conflicts:
	test/unit/event.js
2013-09-30 20:53:44 +04:00
Oleg
33c80f3dd4 Run focus test only if document has focus
(cherry picked from commit 0b9a182ecd)
2013-09-23 21:10:00 +04:00
Richard Gibson
9dadd68e34 No ticket: Fix IE focus test failures
(cherry picked from commit 3d6ed4483e)
2013-09-23 12:01:09 -04:00
Richard Gibson
0c18520923 No ticket: Hide the testing-support jQuery from tests 2013-09-03 10:43:32 -04:00
Timmy Willison
004c1fc5bb Pass all tests (and load Sizzle fixture correctly) when loading with AMD 2013-08-29 16:18:17 -04:00
Oleg Gaidarenko
ef694f6cc7 Don't execute DOM ready tests in AMD mode (they aren't loaded before DOM ready). Close gh-1335.
Conflicts:
	src/manipulation.js
2013-08-16 14:39:42 -04:00
Timmy Willison
0fa52c11cb Update jshintrc to conform to new style guide. Conform to onevar and unused in tests. Fixes #13755. 2013-04-09 11:59:31 -04:00
Dave Methvin
85fc5878b3 Fix #13393. Avoid IE9 activeElement of death. 2013-04-08 21:35:48 -04:00
Richard Gibson
a120bbbfae Ref #12652: Allow overriding native .click() suppression
(cherry picked from commit 14b09ef98e)
2013-04-08 13:57:11 -04:00
Michał Gołębiowski
84a94acae1 delegate/undelegate changed to on/off in unit tests; refs #13554 2013-03-25 22:06:50 -04:00
Michał Gołębiowski
8ca9f931ec bind/unbind changed to on/off in unit tests; refs #13554 2013-03-25 22:06:49 -04:00
Richard Gibson
3f05afbd8d Ref #13353, gh-1183: Capture onlyHandlers in jQuery.Event.isTrigger. 2013-02-28 16:59:12 -05:00
dmitrygusev
eee2eaf1d7 Fix typos. Close gh-1186. 2013-02-28 15:45:10 -05:00
Nguyen Phuc Lam
8bc7bdebef Ref #13283, move .andSelf() to deprecated.js. Close gh-1170. 2013-02-26 22:57:12 -05:00
Dave Methvin
2bbc3d5860 Fix #13471. $().on(".xyz"...) should avoid later crash.
If the event type is an empty string we end up hanging in .off() which makes for
mighty hard debugging. Instead treat it as a no-op. Docs seem clear this is not
allowed.
2013-02-26 12:19:09 -05:00
Richard Gibson
59f5adb622 No ticket: Revise unit tests in anticipation of Sizzle-free builds 2013-02-22 20:13:36 -05:00
Richard Gibson
363299ac24 Ref #13316: Sync all documents on full vs. minified source. Close gh-1147. 2013-02-07 15:16:28 -05:00
Rick Waldron
7f94a5cc3a 2.0: Rewrite data.js (Incl. event, manipulation, tests) 2013-02-03 15:27:55 -05:00
Andrew Plummer
d654914fd0 event: Stricter type checking in trigger - Fixes #13360 - Closes gh-1153
Squashed commit of the following:

commit 5935a362c7
Author: Andrew Plummer <plummer.andrew@gmail.com>
Date:   Fri Feb 1 02:40:42 2013 +0900

    Using "hasOwnProperty" to check for direct properties "type" and
    "namespace" on events before triggering.
(cherry picked from commit f005af54e4)
2013-01-31 12:04:32 -06:00
Dave Methvin
6f7b6915bf Fix #12656. Make event shorthands excludable. 2013-01-27 09:07:00 -05:00
Richard Gibson
348e1a75c8 de486684 with moar guard for IE6
(cherry picked from commit 6c29dd24e9)
2013-01-13 23:00:14 -05:00
Richard Gibson
31b9579715 Fix #13203: delegated events with selector matching Object.prototype property 2013-01-13 21:40:24 -05:00
Richard Gibson
de486684e3 Fix f860e0bd Firefox failures
(cherry picked from commit 0a3a424e65)
2013-01-13 20:37:53 -05:00
Richard Gibson
b75b9ef8d0 Fix #13180: don't delegate into SVG <use>
(cherry picked from commits 36457cb6afc12d4a755cf93442a502783a669517..f860e0bd2f7dd228a14704d78ed5208cbe870d01)
2013-01-13 20:00:03 -05:00
Oleg
c8c6ab6924 Fix #12569. Improve feature detect for event bubbling. Close gh-1076. 2012-12-20 22:08:32 -05:00
Dave Methvin
c928ed432a Remove .live() tests now in Migrate plugin. 2012-12-18 14:42:37 -05:00
Timmy Willison
7d61c5238e Adjust html parsing in event tests to use jQuery.parseHTML explicitly. 2012-12-13 15:52:59 -05:00
Oleg
93e18922c5 Fix #12956. Improve cloneFixAttributes for IE9/10 case. Close gh-1034.
Remove clear(merge)Attributes hack
2012-12-11 22:06:26 -05:00
Timo Tijhof
55313d32a2 Test: Update index.html to new QUnit format. Close gh-1061.
Depends on jquery/sizzle#177, included with the Sizzle submodule in this commit.
2012-12-10 21:48:20 -05:00
Dave Methvin
3fce794844 Fix #12733. Ignore excess spaciness in event strings.
Thanks @bentruyman!
2012-11-24 16:05:20 -05:00
Dave Methvin
6b00b3cad9 Close #10882. Test case for "hover" event in 1.9 2012-11-24 15:25:54 -05:00
Dave Methvin
b7ec6ddd45 Fix #12868. Use native focus/blur to get event order right. 2012-11-24 14:44:39 -05:00
Dave Methvin
1fb2f92c35 Fix #3827. Get the correct checkbox status for a click handler. 2012-11-24 14:08:51 -05:00
Richard Gibson
81b094b2c1 No ticket: update test suite to pass QUnit globals check in most environments. Close gh-1016. 2012-11-05 17:24:03 -05:00
Dave Methvin
d0015ecd2f Missing semicolon. 2012-10-21 20:19:51 -04:00
Oleg
696c553053 Fix failing tests for beforeunload in Safari 5.0. Close gh-1002. 2012-10-21 20:14:05 -04:00
Oleg
9dd0b01017 Fix #12061. Avoid window.onbeforeunload to permit multiple handlers. Close gh-894. 2012-10-20 22:29:18 -04:00
Allen J Schmidt Jr
c6cf30a56e Fix #12739. Keep namespace when triggering with an Event. Close gh-972. 2012-10-19 16:42:13 -04:00
Greg Lavallee
e83bc970f2 Fixes #12736. Move hover event hack to deprecated.js for removal in 1.9. Closes gh-982.
Signed-off-by: Timmy Willison <timmywillisn@gmail.com>
2012-10-16 14:47:11 -04:00
Mike Sherov
ed9e34482a enforce double quotes via JSHint. Closes gh-975 2012-10-16 10:17:14 -04:00
David Bonner
9104a3d5f2 Deprecate fn toggle Closes gh-970 https://github.com/jquery/2012-dev-summit/issues/24 2012-10-15 17:20:33 -04:00
James Huston
6ac8716789 Enforce expects in events.js (https://github.com/jquery/2012-dev-summit/issues/53) Closes gh-961 2012-10-15 12:16:49 -04:00
Dave Methvin
84e45301c5 Update placeholder references to tickets. 2012-08-28 10:09:22 -04:00
Dave Methvin
afd717df9e Fix #12383. All selectors should be delegateTarget-relative 2012-08-28 10:07:16 -04:00
Mike Sherov
a9c2a9bf61 Scorch the earth and retreat on readyState interactive! Close gh-907. 2012-08-23 20:28:22 -04:00
Mike Sherov
0f553ed0ca Fix #12282. IE has premature .readyState == "interactive". Close gh-901. 2012-08-20 08:16:07 -04:00
Nikita Govorov
ff7b7cfd1d Fix #12149. Avoid memory leak on oldIE change events. Close gh-878. 2012-08-19 20:24:03 -04:00
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