Closed
Bug 894345
Opened 11 years ago
Closed 11 years ago
[New Tab Page] Fix drag/drop behavior when rearranging sites
Categories
(Firefox :: Tabbed Browser, defect)
Firefox
Tabbed Browser
Tracking
()
RESOLVED
FIXED
Firefox 25
People
(Reporter: ttaubert, Assigned: ttaubert)
References
Details
Attachments
(1 file)
11.21 KB,
patch
|
jaws
:
review+
|
Details | Diff | Splinter Review |
While investigating some improvements to the about:newtab drag-and-drop tests, I stumbled over broken d&d behavior, implemented by dropTargetShim.js.
The problem is that the shim disables all pointer events for the grid (as necessary) but fails to call event.preventDefault() on dragenter and dragover so that the drag operation always fails (as far as the d&d service is concerned). about:newtab successfully drops the site anyway but I'm sure this could hit us or add-on authors in the future again, so we should fix that.
Assignee | ||
Comment 1•11 years ago
|
||
This patch implements the d&d correctly as it uses preventDefault() to communicate with the d&d service on dragenter/over and drop. I think may not have completely understood how it all works back when I implemented it first. I certainly do now.
The sites.js change removes unused code I found.
The change to _whenTransitionEnded() in transformations.js was necessary due to some strange behavior when other properties that were transitioned as well (but we didn't really care about) finished earlier than expected. This aborted the transition a little too early, unpredictibly, somtimes.
Attachment #776332 -
Flags: review?(jaws)
Assignee | ||
Comment 2•11 years ago
|
||
Almighty try is pleased:
https://tbpl.mozilla.org/?tree=Try&rev=233f2eaf6c3a
Comment 3•11 years ago
|
||
Comment on attachment 776332 [details] [diff] [review]
fix drag/drop behavior when rearranging sites
Review of attachment 776332 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/base/content/newtab/dropTargetShim.js
@@ +218,4 @@
> let node = aTarget.node;
> let event = document.createEvent("DragEvents");
>
> + // Let the event not bubble to avoid recursion.
// The event should not bubble to prevent recursion.
Attachment #776332 -
Flags: review?(jaws) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Whiteboard: [fixed-in-fx-team]
Comment 5•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 25
You need to log in
before you can comment on or make changes to this bug.
Description
•