зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1396833 - Fix tab drag&drop not finishing due to CSS transform not kicking in r=mconley
Summary: In very rare situations, the right number of tabs and the right drop position will lead to the drop event handler trying to start a translateX() transform and then wait for the transitionend event that will never fire. If the old and the new translateX values are too close together (e.g. 1259.1000061035156 and 1259.0999450683594) then the layout engine won't actually start a transform. A simple solution is to round translateX values before comparing them and deciding whether to initiate a transition. Reviewers: mconley Reviewed By: mconley Bug #: 1396833 Differential Revision: https://phabricator.services.mozilla.com/D265 --HG-- extra : amend_source : f1427cfe4c30066373b1acbd0d4017d8a02bc0ac
This commit is contained in:
Родитель
0d3f601004
Коммит
663e3294da
|
@ -7582,8 +7582,8 @@
|
|||
if (draggedTab.parentNode != this || event.shiftKey)
|
||||
this.selectedItem = newTab;
|
||||
} else if (draggedTab && draggedTab.parentNode == this) {
|
||||
let oldTranslateX = draggedTab._dragData.translateX;
|
||||
let tabWidth = draggedTab._dragData.tabWidth;
|
||||
let oldTranslateX = Math.round(draggedTab._dragData.translateX);
|
||||
let tabWidth = Math.round(draggedTab._dragData.tabWidth);
|
||||
let translateOffset = oldTranslateX % tabWidth;
|
||||
let newTranslateX = oldTranslateX - translateOffset;
|
||||
if (oldTranslateX > 0 && translateOffset > tabWidth / 2) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче