Skip to content

Commit

Permalink
fix(modal): keep scroll position
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed May 16, 2024
1 parent e3ca6fb commit be6855d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-scissors-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@baloise/ds-core': patch
---

**modal**: will keep scroll postition
2 changes: 1 addition & 1 deletion packages/core/src/utils/scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class BalScrollHandler {
}

disable() {
if (this.target) {
if (!this.disabled && this.target) {
if (balBrowser.hasWindow && balBrowser.hasDocument) {
this.x = window.pageXOffset || document.documentElement.scrollLeft
this.y = window.pageYOffset || document.documentElement.scrollTop
Expand Down

0 comments on commit be6855d

Please sign in to comment.