mirror of
https://github.com/zen-browser/desktop.git
synced 2026-06-30 14:31:08 +00:00
gh-14417: Fixed tab renaming selection range not starting from the start (gh-14418)
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user