Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was 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

Description

@mahogato

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions