|
3 | 3 | * Copyright (c) 2016 - 2025 Vaadin Ltd. |
4 | 4 | * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ |
5 | 5 | */ |
6 | | -import { isElementHidden } from '@vaadin/a11y-base'; |
7 | 6 | import { microTask, timeOut } from '@vaadin/component-base/src/async.js'; |
8 | 7 | import { Debouncer } from '@vaadin/component-base/src/debounce.js'; |
9 | 8 | import { getNormalizedScrollLeft } from '@vaadin/component-base/src/dir-utils.js'; |
@@ -162,19 +161,6 @@ export const ScrollMixin = (superClass) => |
162 | 161 | */ |
163 | 162 | _onResize() { |
164 | 163 | 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 | | - } |
178 | 164 | } |
179 | 165 |
|
180 | 166 | /** |
@@ -247,14 +233,6 @@ export const ScrollMixin = (superClass) => |
247 | 233 | } |
248 | 234 | }, |
249 | 235 | ); |
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 | | - } |
258 | 236 | } |
259 | 237 |
|
260 | 238 | /** @private */ |
|
0 commit comments