browser: fix scroll the currently selected tab

1) Load a document with a large number of tabs
2) The last tab was selected

Change-Id: I0326bf2e374dddd7e075ea5806e5aefe5f598611
Signed-off-by: Henry Castro <hcastro@collabora.com>
This commit is contained in:
Henry Castro 2024-02-13 10:11:56 -04:00 committed by Caolán McNamara
parent a82d1feafe
commit 72b35d7d02

View file

@ -220,6 +220,10 @@ L.Control.Tabs = L.Control.extend({
}(i).bind(this)); }(i).bind(this));
} }
if (i === selectedPart) {
horizScrollPos = tab.offsetLeft;
}
if (!window.mode.isMobile()) { if (!window.mode.isMobile()) {
L.DomEvent.on(tab, 'dblclick', function(j) { L.DomEvent.on(tab, 'dblclick', function(j) {
return function() { return function() {