Skip to content

Commit 93887fd

Browse files
authored
Merge pull request #1741 from adumesny/master
Safari mac: fix scrolling
2 parents fcab1d1 + d5b22d3 commit 93887fd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ Change log
5757
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
5858
## 4.2.1-dev
5959

60-
- fix [#1684](https://github.com/gridstack/gridstack.js/issues/1684) mac Safari H5 draggable broken in 4.0.1. Thanks [@wurambo](https://github.com/wurambo)
60+
- fix [#1684](https://github.com/gridstack/gridstack.js/issues/1684) [#1550](https://github.com/gridstack/gridstack.js/issues/1550) mac Safari H5 draggable broken in 4.0.1. Thanks [@wurambo](https://github.com/wurambo)
61+
- fix [#1562](https://github.com/gridstack/gridstack.js/issues/1562) mac Safari page scroll fix
6162

6263
## 4.2.1 (2021-4-18)
6364

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export class Utils {
293293

294294
/** @internal */
295295
static getScrollParent(el: HTMLElement): HTMLElement {
296-
if (el === null) return document.documentElement;
296+
if (el === null) return document.scrollingElement as HTMLElement;
297297
const style = getComputedStyle(el);
298298
const overflowRegex = /(auto|scroll)/;
299299

0 commit comments

Comments
 (0)