diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2014-03-11 11:50:12 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2014-04-16 18:47:15 +0200 |
commit | 3576ceb360eb0381a98f3c6b67d890c3834efa8a (patch) | |
tree | 66f79781c94f33dd7f00fcf9eb09a2f8993b1d64 /tests/visual/compound | |
parent | 919d9185f2cf586f794b367a2570368fd81f3879 (diff) | |
download | jquery-ui-3576ceb360eb0381a98f3c6b67d890c3834efa8a.tar.gz jquery-ui-3576ceb360eb0381a98f3c6b67d890c3834efa8a.zip |
Resizable: Remove bad workaround for draggable+resizable
This adds a compound test page for draggable+resizable, which had no coverage
before. Using that page shows that there is no way to reproduce the behaviour
described in the original ticket that caused this workaround, since its not
possible to resize an element beyond the window boundaries. Therefore removing
the workaround, which is 6+ years old and has no test coverage, seems like the
sanest approach.
Fixes #6939
Closes gh-1210
Diffstat (limited to 'tests/visual/compound')
-rw-r--r-- | tests/visual/compound/draggable_resizable.html | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/visual/compound/draggable_resizable.html b/tests/visual/compound/draggable_resizable.html new file mode 100644 index 000000000..d38399431 --- /dev/null +++ b/tests/visual/compound/draggable_resizable.html @@ -0,0 +1,51 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Compound Visual Test: Draggable and Resizable block element</title> + <link rel="stylesheet" href="../visual.css"> + <link rel="stylesheet" href="../../../themes/base/all.css"> + <script src="../../../jquery.js"></script> + <script src="../../../ui/core.js"></script> + <script src="../../../ui/widget.js"></script> + <script src="../../../ui/mouse.js"></script> + <script src="../../../ui/draggable.js"></script> + <script src="../../../ui/resizable.js"></script> + <style> + .draggable { + margin: 0.5em; + padding: 0.5em; + } + .absolute { + color: red; + position: absolute !important; + } + </style> + <script> + $(function() { + $( ".draggable" ) + .addClass( "ui-widget ui-widget-header ui-corner-all" ) + .draggable({ + revert: "invalid" + }) + .resizable({ + minHeight: 13, + handles: "s" + }); + $( ".draggable:last" ).addClass( "absolute" ); + }); + </script> +</head> +<body> + +<p>WHAT: Three draggable and resizable elements, with only a bottom handle. Last one (red color) is absolutely positioned.</p> +<p>EXPECTED: Each element can be dragged and resized. The first two stay with their relative positioning (induced by draggable). The last one can be resized despite the absolute positioning.</p> + +<div id="first"> + <div class="draggable">Draggable 1-1</div> + <div class="draggable">Draggable 1-2</div> + <div class="draggable">Draggable 1-3</div> +</div> + +</body> +</html> |