aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/draggable
Commit message (Collapse)AuthorAgeFilesLines
* Build: Migrate from JSHint & JSCS to ESLintMichał Gołębiowski-Owczarek2021-06-075-0/+5
| | | | | Fixes #15393 Closes gh-1958
* Tests: Make some number comparisons less strictMichał Gołębiowski-Owczarek2021-03-091-3/+11
| | | | | | | | | | Some of the APIs return fractional values in newer jQueries, making comparisons sometimes not being 100% accurate. Allow some delta. This is similar to what was already done in 98b539171b6e805fa79346a5e9896865e5213b9c but a few cases affecting IE and/or Edge Legacy were missed. Closes gh-1947
* Tests: Ensure no timers are running at the end of each test (#1920)Michał Gołębiowski-Owczarek2020-05-164-6/+15
| | | | | | | | | | | | | This helps fix issues that make tooltip tests sometimes fail when run against jQuery 3.2 or newer due to timing differences. Details: * Add the `moduleAfterEach` function ensuring no timers are running. * Attach this function via `common.testWidget`. * Attach this function to most test suites. * Add a tooltip test helper cleaning up leftover timers. * Rename legacy `setup`/`teardown` hooks to `beforeEach`/`afterEach`. Closes gh-1920
* All: Migrate away from deprecated/removed Core APIsMichał Gołębiowski-Owczarek2019-12-081-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of the changes: * Build: Add jQuery 3.2.0-3.4.1 to versions UI can be tested against * Build: Load jQuery & Migrate via HTTPS * Build: Add package-lock.json to .gitignore * Build: Update jQuery Migrate from 3.0.0 to 3.1.0 * Build: Allow to run tests against jQuery 3.x-git * Build: Fix formatting according to JSCS rules * Build: Disable JSCS for the inlined jQuery Color * All: Switch from $.isArray to Array.isArray (jQuery.isArray will be removed in jQuery 4.0) * All: Switch from `$.isFunction( x )` to `typeof x === "function"` (jQuery.isFunction will be removed in jQuery 4.0) * All: Inline jQuery.isWindow as it'll be removed in jQuery 4.0 * Effects: Fix a timing issue in a variable declaration. Previously, a jQuery object was created, chained & assigned to a variable that was then accessed in a callback used inside of this chained definition. Due to a timing difference in when the callback fired for the first time in latest jQuery master, it was being called before the variable was defined. * Tests: Make dialog & draggable unit tests less strict (newest jQuery returns fractional results in some cases, making comparisons fail when there's a tiny difference) * All: Migrate from $.trim to bare String.prototype.trim (jQuery.trim will be deprecated in jQuery 3.5) Closes gh-1901
* Draggable: Fix spurious blur in dialogs on mousedownRyan Oriecuia2016-09-131-0/+30
| | | | | | | | | | | | | | | | | | I was running into a problem with a popup menu control in a dialog; clicks weren't working (but keyboard was working fine). It turned out that the menu was getting destroyed before the click event could fire. Tracked down the issue to the way draggable blurs focused controls; it was doing the blur before it ran through the logic to figure out if the drag was actually on the handle. I've moved the blur below these checks, so it'll only blur things if it actually needs to handle the drag. Otherwise, it asserts no opinion on what should and shouldn't be focused, which seems like the way things ought to be. Also, added a unit test to check for the expected behavior. Fixes #15046 Closes gh-1730
* Draggable: Shift to use no globalsAmanpreet Singh2016-04-146-418/+427
|
* Draggable: Improve detection for when to blur the active elementScott González2016-02-091-1/+21
| | | | | | Fixes #12472 Fixes #14905 Closes gh-1548
* Draggable: Skip window bubbling test in IE 8Scott González2015-10-271-14/+20
| | | | | | | | | IE 8 implements DOM Level 2 Events which only has events propagate up to the document, not the window. Ref #10818 Ref gh-1621 Closes gh-1627
* Draggable: Fix options testsJörn Zaefferer2015-10-252-12/+14
| | | | | | | | These failed when running through tests/unit/all.html, due to the smaller iframe. Reducing a browser window enough triggered the same issue. Making the top offset much smaller fixes that. The rest is fixing bad indent and adds a missing module call.
* Mouse: Don't stop propagation of mouseupHannah Methvin2015-10-181-0/+17
| | | | Fixes #10818
* Draggable: Style updatesAlexander Schmitz2015-09-116-367/+378
| | | | Ref #14246
* Draggable: Style updatesAlexander Schmitz2015-08-213-13/+13
| | | | | Ref #14246 Ref gh-1588
* Sortable: Move sortable into widgets folderAlexander Schmitz2015-08-081-1/+1
| | | | Ref #13885
* Resizable: Move resizable into widgets folderAlexander Schmitz2015-08-081-1/+1
| | | | Ref #13885
* Droppable: Move droppable into widgets folderAlexander Schmitz2015-08-082-2/+2
| | | | Ref #13885
* Draggable: Move draggable into widgets folderAlexander Schmitz2015-08-086-6/+6
| | | | Ref #13885
* Draggable: Remove core event/alias and deprecated module dependenciesAlexander Schmitz2015-05-202-5/+5
|
* Tests: Fix AMD loading in IE8Scott González2015-04-171-0/+1
| | | | | It appears that we must load require.js via a standard script tag in order for it to work properly in IE8.
* Tests: Rename filesScott González2015-04-096-3/+3
| | | | Ref gh-1528
* Tests: Widget test helpers extend the main helperScott González2015-04-094-153/+172
| | | | | Ref #10119 Ref gh-1528
* Draggable: Convert tests to new infrastructureScott González2015-04-097-252/+245
| | | | | Ref #10119 Ref gh-1528
* Tests: Convert closeEnough() to a proper QUnit assertionScott González2015-04-092-17/+17
| | | | | | | Should eventually replace with qunit-assert-close. Ref #10119 Ref gh-1528
* Revert "Draggable: Set explicit width/height instead of right/bottom"TJ VanToll2015-04-082-35/+2
| | | | | | This reverts commit 8eca7b8f45885d20c13f1bf64cad8bee5fc1d5c5. Fixes #10725
* Tests: Switch to the new qunit-composite moduleScott González2015-04-071-2/+2
| | | | | | This module was created from our existing implementation. Closes gh-1532
* All: Standard spacing inside selector stringsScott González2015-03-261-1/+1
| | | | Closes gh-1521
* Draggable: Use new has/lacksClasses assertions for all class checksAlexander Schmitz2015-03-113-15/+15
|
* Widget: Add classes option and _add/_remove/_toggleClass methodsAlexander Schmitz2015-03-111-0/+1
| | | | | Fixes #7053 Closes gh-1411
* Draggable: Ensure parent is correct after dragging through sortableMike Sherov2014-11-081-0/+23
| | | | Fixes #10669
* Draggable: Add battery of tests to cover connectToSortableMike Sherov2014-08-262-28/+107
| | | | | | Refs #9481 Refs #9675 Closes gh-1323
* Sortable: cancelHelperRemoval only considers helper, not placeholderMike Sherov2014-08-261-1/+1
| | | | Refs #9675
* Draggable: append divs to iframe parent for iframefixMike Sherov2014-08-241-0/+42
| | | | | | | This allows the blocking div to move with the iframe in most situations, whereas appending to the body wouldn't. Fixes #9671
* Draggable: Check all parents for fixed positioning when scrollingMike Sherov2014-08-231-12/+20
| | | | Fixes #9612
* Draggable: No cloning in connectToSortable and ensure correct positionMike Sherov2014-08-232-1/+105
| | | | | | | | | | | Draggables now forcefully recalculate their position when dragged out of a sortable. Sortables now override draggable position when a draggable is dragged into it. Lastly, no longer remove sortable helper when dragging a draggable out, which allows us to not use a clone. Fixes #7734 Fixes #8809 Closes gh-1322
* Draggable Tests: Ensure scrolling and dragging tests assert correctlyDave Stein2014-08-224-12/+27
|
* Build: Pull in jquery.simulate.js from BowerMike Sherov2014-08-221-1/+1
| | | | Fixes #10563
* Draggable Tests: Fix failures due to fractional widthsMike Sherov2014-08-201-2/+2
|
* Mouse: Only detect out of document mouseups after a mousemoveMike Sherov2014-08-201-0/+17
| | | | | | | | This prevents the firing of mouseup in the case of IE<9, which will fire a mousemove event if content is placed under the cursor on mousedown. Fixes #7778
* Draggable: Ensure helper is positioned even if its the element itselfMike Sherov2014-08-191-0/+19
| | | | Fixes #9446
* Draggable: Set explicit width/height instead of right/bottom css.Uri Gilad2014-08-182-2/+34
| | | | Fixes #7772
* Draggable: Ensure overflow:visible containments are correctly measuredMike Sherov2014-08-171-0/+30
| | | | Fixes #7016
* Draggable: Only focus the draggable if the event occurs on a handleMike Sherov2014-08-171-7/+15
| | | | Refs #10527
* Draggable: Recalculate hash offset on start after plugins runMike Sherov2014-08-161-0/+39
| | | | Fixes #6884
* Draggable Tests: Clarify position helper test generationMike Sherov2014-08-141-43/+44
|
* Draggable: Account for margins when snappingMike Sherov2014-08-141-0/+4
| | | | Fixes #9724
* Draggable Tests: Fix IE8 test when native scroll happensMike Sherov2014-08-131-3/+22
|
* Draggable: ignore overflow:hidden containers with scroll optionMike Sherov2014-08-121-0/+14
| | | | | | While it is true that overflow:hidden elements can be scrolled programatically, this breaks user expectation. Therefore, do not scroll inside an overflow:hidden container.
* Draggable: consider offsets from overflow:hidden parentsMike Sherov2014-08-122-31/+37
| | | | | | | | Developers can programmatically set scrollTop/Left on draggable containers that are overflow:hidden. They must be considered for positioning. Fixes #10147
* Draggable Tests: Fix several whitespace issues.Mike Sherov2014-08-122-3/+2
|
* Draggable Tests: Fix inconsistent operator spacing.Mike Sherov2014-08-061-4/+4
|
* Tests: Fix composite testsScott González2014-08-011-1/+1
|