Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

select: changes scroll position when closed with bootstrap 5 #12134

Closed
mahogato opened this issue Nov 23, 2021 · 1 comment
Closed

select: changes scroll position when closed with bootstrap 5 #12134

mahogato opened this issue Nov 23, 2021 · 1 comment

Comments

@mahogato
Copy link

Actual behavior

It's the same bug as #10588 but i found it again when i installed bootstrap 5.

I found out it's because this css code, on bootstrap:

@media (prefers-reduced-motion: no-preference) {
  :root {
    scroll-behavior: smooth;
  }
}

More concretely:
https://github.com/twbs/bootstrap/blob/58ffe2334a94a061afab87c9fd1266445016bca5/scss/_reboot.scss#L28

Possible solution

I added this code in my styles.css but i don't know if this affects elsewhere:

@media (prefers-reduced-motion: no-preference) {
  :root {
    scroll-behavior: unset;
  }
}

Codepen

Example with the "solution"

Versions

  • AngularJS: 1.8.2
  • AngularJS Material: 1.2.3
  • Bootstrap: 5.1.3
@mahogato mahogato added needs triage Issues that need initial triage type: bug labels Nov 23, 2021
@Splaktar Splaktar changed the title md-select changes scroll position when closed with bootstrap 5 select: changes scroll position when closed with bootstrap 5 Dec 15, 2021
@Splaktar Splaktar removed type: bug needs triage Issues that need initial triage labels Dec 15, 2021
@Splaktar
Copy link
Member

This seems to be an issue with Bootstrap 5 not being compatible with AngularJS Material. We do not currently plan to support Bootstrap 5 officially, but your workaround seems like a good option for those who need to support both libraries in a single app. Thank you for sharing it.

@Splaktar Splaktar modified the milestone: - Backlog Dec 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants