Skip to content

Commit

Permalink
Safari mac: fix scrolling
Browse files Browse the repository at this point in the history
fix gridstack#1562
* changed to use document.scrollingElement
as topmost element, which seem correct and required by safari.
  • Loading branch information
adumesny committed Apr 23, 2021
1 parent 237c9c7 commit d5b22d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ Change log
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## 4.2.1-dev

- 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)
- 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)
- fix [#1562](https://github.com/gridstack/gridstack.js/issues/1562) mac Safari page scroll fix

## 4.2.1 (2021-4-18)

Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export class Utils {

/** @internal */
static getScrollParent(el: HTMLElement): HTMLElement {
if (el === null) return document.documentElement;
if (el === null) return document.scrollingElement as HTMLElement;
const style = getComputedStyle(el);
const overflowRegex = /(auto|scroll)/;

Expand Down

0 comments on commit d5b22d3

Please sign in to comment.