All users were logged out of Bugzilla on October 13th, 2018

[New Tab Page] Fix drag/drop behavior when rearranging sites

RESOLVED FIXED in Firefox 25

Status

()

RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: ttaubert, Assigned: ttaubert)

Tracking

(Depends on: 1 bug)

unspecified
Firefox 25
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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

5 years ago
Created attachment 776332 [details] [diff] [review]
fix drag/drop behavior when rearranging sites

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)

Updated

5 years ago
Blocks: 894876
(Assignee)

Updated

5 years ago
Blocks: 895359
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+
https://hg.mozilla.org/mozilla-central/rev/0a2cc86d61b7
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 25

Updated

5 years ago
Depends on: 948413

Updated

4 years ago
Depends on: 1068354

Updated

4 years ago
Depends on: 1000097
You need to log in before you can comment on or make changes to this bug.