зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1705180 - ensure tree editing doesn't exceed the bounds of the tree widget, r=jaws
As noted in https://bugzilla.mozilla.org/show_bug.cgi?id=1705180#c1, this is not an ideal fix, but it should at least ensure the tree input field doesn't get too wide and get clipped by the panel, with text disappearing. Differential Revision: https://phabricator.services.mozilla.com/D113647
This commit is contained in:
Родитель
2c692937aa
Коммит
1e5c0a67a1
|
@ -1336,14 +1336,12 @@
|
|||
|
||||
// The leftside of the textbox is aligned to the left side of the text
|
||||
// in LTR mode, and left side of the cell in RTL mode.
|
||||
var left, widthdiff;
|
||||
if (style.direction == "rtl") {
|
||||
left = cellRect.x;
|
||||
widthdiff = cellRect.x - textRect.x;
|
||||
} else {
|
||||
left = textRect.x;
|
||||
widthdiff = textRect.x - cellRect.x;
|
||||
}
|
||||
let left = style.direction == "rtl" ? cellRect.x : textRect.x;
|
||||
// Note: this won't be quite right in RTL for trees using twisties
|
||||
// or indentation. bug 1708159 tracks fixing the implementation
|
||||
// of getCoordsForCellItem which we called above so it provides
|
||||
// better numbers in those cases.
|
||||
let widthdiff = Math.abs(textRect.x - cellRect.x);
|
||||
|
||||
input.style.left = `${left}px`;
|
||||
input.style.height = `${textRect.height +
|
||||
|
|
Загрузка…
Ссылка в новой задаче