gh-14417: Fixed tab renaming selection range not starting from the start (gh-14418)

This commit is contained in:
mr. m
2026-06-29 17:10:23 +02:00
committed by GitHub
parent 84ba80bc11
commit 87220f71f4

View File

@@ -1612,7 +1612,9 @@ window.gZenVerticalTabsManager = {
// it will reset to the original name anyway
if (hasChanged || (this._tabEdited.zenStaticLabel && newName)) {
this._tabEdited.zenStaticLabel = newName;
gBrowser._setTabLabel(this._tabEdited, newName);
gBrowser._setTabLabel(this._tabEdited, newName, {
_zenChangeLabelFlag: true,
});
gZenUIManager.showToast("zen-tabs-renamed");
} else {
delete this._tabEdited.zenStaticLabel;
@@ -1708,7 +1710,8 @@ window.gZenVerticalTabsManager = {
this._tabEdited.after(input);
}
input.focus();
input.select();
input.setSelectionRange(0, input.value.length, "backward");
input.scrollLeft = 0;
input.addEventListener("blur", this._renameTabHalt);
},