From 548bdb12a116771b34a99ba97769ddef22f7d156 Mon Sep 17 00:00:00 2001 From: awgy Date: Sat, 5 Feb 2011 02:13:55 -0600 Subject: [PATCH 1/2] Mouse: Reset click event suppression on next mousedown. Fixes #6946 - Mouse: click event suppressed after drag in Gecko --- ui/jquery.ui.mouse.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index f5e8b58c02..bfe4a75782 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -75,6 +75,11 @@ $.widget("ui.mouse", { } } + // Click event may never have fired (Gecko & Opera) + if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) { + $.removeData(event.target, this.widgetName + '.preventClickEvent'); + } + // these delegates are required to keep context this._mouseMoveDelegate = function(event) { return self._mouseMove(event); From cf0649ed6abcee7045308a8cdbe9123259fa064a Mon Sep 17 00:00:00 2001 From: awgy Date: Sat, 5 Feb 2011 07:45:37 -0600 Subject: [PATCH 2/2] Mouse: Adding visual test for issue #6946 - Mouse: click event suppressed after drag in Gecko --- tests/visual/mouse/mouse_ticket_6946.html | 67 +++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 tests/visual/mouse/mouse_ticket_6946.html diff --git a/tests/visual/mouse/mouse_ticket_6946.html b/tests/visual/mouse/mouse_ticket_6946.html new file mode 100644 index 0000000000..0851d4d191 --- /dev/null +++ b/tests/visual/mouse/mouse_ticket_6946.html @@ -0,0 +1,67 @@ + + + + + Test for Issue #6946 + + + + + + + + + + +

Test for Issue #6946

+

Use the following list to test the steps listed below:

+
+
One
+
Two
+
Three
+
+
+

Expected

+
    +
  1. Drag an item to a new position in the list and release.
  2. +
  3. The click event should be received (appropriately suppressed by jQuery UI).
  4. +
  5. Click the same item.
  6. +
  7. The click event should be received.
  8. +
  9. Click the same item again.
  10. +
  11. The click event should be received.
  12. +
+

Experienced (Gecko/Opera)

+
    +
  1. Drag an item to a new position in the list and release.
  2. +
  3. The click event is not received (never sent by browser).
  4. +
  5. Click the same item.
  6. +
  7. The click event is not received (erroneously suppressed by jQuery UI).
  8. +
  9. Click the same item again.
  10. +
  11. The click event is finally received.
  12. +
+ + +​ \ No newline at end of file