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(get-background-color): scroll element into view horizontally #1845

Merged
merged 3 commits into from
Oct 14, 2019

Conversation

straker
Copy link
Contributor

@straker straker commented Oct 14, 2019

In IE11 scrollIntoView does not accept an options parameter, so will treat any truthy value as passing the boolean true. This changes the behavior of the code that's currently there.

So instead we'll just see if the center point of the element is within the viewport and if not, look for a scrollable parent element and scroll it. Should fix the issue without causing any problems in IE11.

Closes issue: #1730

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

@straker straker requested a review from a team as a code owner October 14, 2019 16:14
lib/commons/color/get-background-color.js Show resolved Hide resolved
@straker straker merged commit 50df70a into develop Oct 14, 2019
@straker straker deleted the horizontalScroll branch October 14, 2019 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants