Skip to content

Commit a14752c

Browse files
authored
refactor: remove no longer needed Firefox workaround (#10304)
1 parent 5a13239 commit a14752c

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

packages/grid/src/vaadin-grid-scroll-mixin.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Copyright (c) 2016 - 2025 Vaadin Ltd.
44
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
55
*/
6-
import { isElementHidden } from '@vaadin/a11y-base';
76
import { microTask, timeOut } from '@vaadin/component-base/src/async.js';
87
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
98
import { getNormalizedScrollLeft } from '@vaadin/component-base/src/dir-utils.js';
@@ -162,19 +161,6 @@ export const ScrollMixin = (superClass) =>
162161
*/
163162
_onResize() {
164163
this.__updateHorizontalScrollPosition();
165-
166-
// For Firefox, manually restore last scroll position when grid becomes
167-
// visible again. This solves an issue where switching visibility of two
168-
// grids causes Firefox trying to synchronize the scroll positions between
169-
// the two grid's table elements.
170-
// See https://github.com/vaadin/web-components/issues/5796
171-
if (this._firefox) {
172-
const isVisible = !isElementHidden(this);
173-
if (isVisible && this.__previousVisible === false) {
174-
this._scrollTop = this.__memorizedScrollTop || 0;
175-
}
176-
this.__previousVisible = isVisible;
177-
}
178164
}
179165

180166
/**
@@ -247,14 +233,6 @@ export const ScrollMixin = (superClass) =>
247233
}
248234
},
249235
);
250-
251-
// Memorize last scroll position in Firefox
252-
if (this._firefox) {
253-
const isVisible = !isElementHidden(this);
254-
if (isVisible && this.__previousVisible !== false) {
255-
this.__memorizedScrollTop = this._scrollTop;
256-
}
257-
}
258236
}
259237

260238
/** @private */

0 commit comments

Comments
 (0)