I'm not sure what you mean by the first point, but you're correct that: - No behavior change whatsoever for horizontal tabs - No behavior change for when a new tab is added via the tab right-click menu - Behavior change only for when a new tab is opened via the vertical tabs new tab button, and then yes it would be inserted at the start of the list. After a first pass at looking into this, I think it might be a matter of adding a condition [here](https://searchfox.org/mozilla-central/rev/261005fcc4d6f8b64189946958211259fb45e9e1/browser/components/tabbrowser/content/tabbrowser.js#3628) ``` // Ensure index is within bounds. if (pinned) { index = Math.max(index, 0); index = Math.min(index, this._numPinnedTabs); } else { index = Math.max(index, this._numPinnedTabs); index = Math.min(index, this.tabs.length); index = this.tabContainer.verticalMode && !openerTab ? 0 : index; } ``` But we'll need good test coverage to be sure.
Bug 1914451 Comment 4 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I'm not sure what you mean by the first point, but you're correct that: - No behavior change whatsoever for horizontal tabs - No behavior change for when a new tab is added via the tab right-click menu - Behavior change only for when a new tab is opened via the vertical tabs new tab button, and then yes it would be inserted at the start of the list. After a first pass at looking into this, I think it might be a matter of adding a condition in [_insertTabAtIndex](https://searchfox.org/mozilla-central/rev/261005fcc4d6f8b64189946958211259fb45e9e1/browser/components/tabbrowser/content/tabbrowser.js#3628). So something like `index = this.tabContainer.verticalMode && !openerTab ? 0 : index` in the `else` block. ``` // Ensure index is within bounds. if (pinned) { index = Math.max(index, 0); index = Math.min(index, this._numPinnedTabs); } else { index = Math.max(index, this._numPinnedTabs); index = Math.min(index, this.tabs.length); index = this.tabContainer.verticalMode && !openerTab ? 0 : index; } ``` But we'll need good test coverage to be sure.
I'm not sure what you mean by the first point, but you're correct that: - No behavior change whatsoever for horizontal tabs - No behavior change for when a new tab is added via the tab right-click menu for vertical tabs. - Behavior change only for when a new tab is opened via the vertical tabs new tab button, and then yes it would be inserted at the start of the list. After a first pass at looking into this, I think it might be a matter of adding a condition in [_insertTabAtIndex](https://searchfox.org/mozilla-central/rev/261005fcc4d6f8b64189946958211259fb45e9e1/browser/components/tabbrowser/content/tabbrowser.js#3628). So something like `index = this.tabContainer.verticalMode && !openerTab ? 0 : index` in the `else` block. ``` // Ensure index is within bounds. if (pinned) { index = Math.max(index, 0); index = Math.min(index, this._numPinnedTabs); } else { index = Math.max(index, this._numPinnedTabs); index = Math.min(index, this.tabs.length); index = this.tabContainer.verticalMode && !openerTab ? 0 : index; } ``` But we'll need good test coverage to be sure.
I'm not sure what you mean by the first point, but you're correct that: - No behavior change whatsoever for horizontal tabs - No behavior change for when a new tab is added via the tab right-click menu for vertical tabs. - Behavior change only for when a new tab is opened via the vertical tabs new tab button and the modifier + T keyboard shortcut, and then yes it would be inserted at the start of the list. After a first pass at looking into this, I think it might be a matter of adding a condition in [_insertTabAtIndex](https://searchfox.org/mozilla-central/rev/261005fcc4d6f8b64189946958211259fb45e9e1/browser/components/tabbrowser/content/tabbrowser.js#3628). So something like `index = this.tabContainer.verticalMode && !openerTab ? 0 : index` in the `else` block. ``` // Ensure index is within bounds. if (pinned) { index = Math.max(index, 0); index = Math.min(index, this._numPinnedTabs); } else { index = Math.max(index, this._numPinnedTabs); index = Math.min(index, this.tabs.length); index = this.tabContainer.verticalMode && !openerTab ? 0 : index; } ``` But we'll need good test coverage to be sure. Edited to include the modifier + T keyboard shortcut.