Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix(bal-modal): opening bal-modal leads to page scroll to top #1396

Open
1 task done
tri-vo-mesoneer opened this issue May 11, 2024 · 9 comments · Fixed by #1398 · May be fixed by #1402
Open
1 task done

🐛 fix(bal-modal): opening bal-modal leads to page scroll to top #1396

tri-vo-mesoneer opened this issue May 11, 2024 · 9 comments · Fixed by #1398 · May be fixed by #1402
Assignees
Labels
🐛 bug Something isn't working

Comments

@tri-vo-mesoneer
Copy link

Current Behavior

bal-modal does not restore the scroll position.
If the page is long, then opening the modal which is in the bottom of the page, leads to the page will be scrolled to top when bal-modal is opened.

Expected Behavior

I expect that the page will keep the scroll postion when bal-modal is opened or closed.

Steps to Reproduce

  1. You can open Code Sandbox in the Baloise document link.
  2. Just simply add some element above bal-modal in order to make the page longer.
  3. Click on button to open modal and you will see the page is scrolled to top.
    BDS_modal

Version

latest

Browsers

Chrome, Microsoft Edge

Device

Desktop

Code Reproduction URL

https://codesandbox.io/p/sandbox/angular-forked-p65s8z?file=%2Fsrc%2Fapp%2Fexample.component.html%3A5%2C1

Additional Information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tri-vo-mesoneer tri-vo-mesoneer added the 🐛 bug Something isn't working label May 11, 2024
@tri-vo-mesoneer tri-vo-mesoneer changed the title 🐛 fix(bal-modal): title 🐛 fix(bal-modal): opening bal-modal leads to page scroll to top May 11, 2024
@hirsch88 hirsch88 self-assigned this May 16, 2024
@hirsch88
Copy link
Member

/cib

Copy link
Contributor

Branch fix/issue-1396 created!

github-actions bot added a commit that referenced this issue May 16, 2024
hirsch88 added a commit that referenced this issue May 16, 2024
* Create PR for #1396

* fix(modal): keep scroll position

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Gery Hirschfeld <gerhard.hirschfeld@baloise.ch>
@hirsch88 hirsch88 reopened this May 21, 2024
@hirsch88
Copy link
Member

A builded angular app still does scroll to the top

@hirsch88
Copy link
Member

/cib

Copy link
Contributor

Branch fix/issue-1396 created!

github-actions bot added a commit that referenced this issue May 23, 2024
@hirsch88
Copy link
Member

Could not reproduce the issue
@FilipMarkovski please try to update the Design System and clear the cache.

@hirsch88
Copy link
Member

created a version with logs to investigate the angular issue
16.2.0-snapshot.1402-c52849609

@hirsch88
Copy link
Member

@FilipMarkovski 16.2.0-snapshot.1402-8b748b200

@FilipMarkovski
Copy link

@hirsch88 If you can, keep this issue open until the required libraries are updated to the latest version of Design System, because that change will come in some of the future sprints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
3 participants