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

prevent scrolling to the fake-element inserted for copy-buttons #1500

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

ymo-sci
Copy link
Contributor

@ymo-sci ymo-sci commented Jan 30, 2025

Description

The logic for copying values via copy-button is quiet weird, but "the-way-to-go" for all browsers and all cases (http, https).

in some rare cases (where scrollPaddingTop is set) the top-scroll value does not fit to the real scroll-position. So vie preventScroll we ask the browser to not scroll on focus. Is also not supported by all browsers, but does not break the functionality

Checklist

  • Code change has been tested and works locally
  • Code was formatted via IntelliJ and follows SonarLint & best practices
  • Patch Tasks: Is local execution of Patch Tasks necessary? If so, please also mark the PR with the tag.

in some rare cases the top-scroll value does not fit to the real scroll-position. So vie preventScroll we ask the browser to not scroll on focus
@ymo-sci ymo-sci added the 🧬 Enhancement Contains new features label Jan 30, 2025
@ymo-sci ymo-sci merged commit 637c56e into develop Jan 30, 2025
3 of 4 checks passed
@ymo-sci ymo-sci deleted the feature/ymo/copy-weird branch January 30, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧬 Enhancement Contains new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants