mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 964204 - fix drag glitches in Australis panel and palette, r=mikedeboer
--HG-- extra : rebase_source : ca944ff625641f4c69141d7740d40d243b9971b4
This commit is contained in:
parent
82d21bdfd6
commit
7a68e77608
@ -1411,10 +1411,13 @@ CustomizeMode.prototype = {
|
||||
|
||||
_setGridDragActive: function(aDragOverNode, aDraggedItem, aValue) {
|
||||
let targetArea = this._getCustomizableParent(aDragOverNode);
|
||||
let draggedWrapper = this.document.getElementById("wrapper-" + aDraggedItem.id);
|
||||
let originArea = this._getCustomizableParent(draggedWrapper);
|
||||
let positionManager = DragPositionManager.getManagerForArea(targetArea);
|
||||
let draggedSize = this._getDragItemSize(aDragOverNode, aDraggedItem);
|
||||
let isWide = aDraggedItem.classList.contains(CustomizableUI.WIDE_PANEL_CLASS);
|
||||
positionManager.insertPlaceholder(targetArea, aDragOverNode, isWide, draggedSize);
|
||||
positionManager.insertPlaceholder(targetArea, aDragOverNode, isWide, draggedSize,
|
||||
originArea == targetArea);
|
||||
},
|
||||
|
||||
_getDragItemSize: function(aDragOverNode, aDraggedItem) {
|
||||
|
@ -126,7 +126,7 @@ AreaPositionManager.prototype = {
|
||||
* they would have if we had inserted something before aBefore. We use CSS
|
||||
* transforms for this, which are CSS transitioned.
|
||||
*/
|
||||
insertPlaceholder: function(aContainer, aBefore, aWide, aSize) {
|
||||
insertPlaceholder: function(aContainer, aBefore, aWide, aSize, aIsFromThisArea) {
|
||||
let isShifted = false;
|
||||
let shiftDown = aWide;
|
||||
for (let child of aContainer.children) {
|
||||
@ -157,7 +157,7 @@ AreaPositionManager.prototype = {
|
||||
if (this.__moveDown) {
|
||||
shiftDown = true;
|
||||
}
|
||||
if (!this._lastPlaceholderInsertion) {
|
||||
if (aIsFromThisArea && !this._lastPlaceholderInsertion) {
|
||||
child.setAttribute("notransition", "true");
|
||||
}
|
||||
// Determine the CSS transform based on the next node:
|
||||
@ -167,7 +167,8 @@ AreaPositionManager.prototype = {
|
||||
child.style.transform = "";
|
||||
}
|
||||
}
|
||||
if (aContainer.lastChild && !this._lastPlaceholderInsertion) {
|
||||
if (aContainer.lastChild && aIsFromThisArea &&
|
||||
!this._lastPlaceholderInsertion) {
|
||||
// Flush layout:
|
||||
aContainer.lastChild.getBoundingClientRect();
|
||||
// then remove all the [notransition]
|
||||
|
@ -75,6 +75,7 @@ toolbarpaletteitem[place="panel"] {
|
||||
transition: transform .3s ease-in-out;
|
||||
}
|
||||
|
||||
toolbarpaletteitem[notransition].panel-customization-placeholder,
|
||||
toolbarpaletteitem[notransition][place="palette"],
|
||||
toolbarpaletteitem[notransition][place="panel"] {
|
||||
transition: none;
|
||||
|
Loading…
Reference in New Issue
Block a user