Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(Popper): fix comparison for scrollParent #1959

Merged
merged 3 commits into from
Sep 24, 2019

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Sep 23, 2019

Fixes #1924

const popperHasScrollableParent = getScrollParent(contentRef.current) !== document.body

The previous check was always false positive when Popper was rendered in another document. This PR fixes it.

@codecov
Copy link

codecov bot commented Sep 23, 2019

Codecov Report

Merging #1959 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1959      +/-   ##
==========================================
+ Coverage   70.26%   70.27%   +<.01%     
==========================================
  Files         893      893              
  Lines        7891     7892       +1     
  Branches     2309     2309              
==========================================
+ Hits         5545     5546       +1     
  Misses       2333     2333              
  Partials       13       13
Impacted Files Coverage Δ
packages/react/src/lib/positioner/Popper.tsx 87.5% <100%> (+0.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 885947f...87d3124. Read the comment docs.

@layershifter layershifter merged commit 15db9b8 into master Sep 24, 2019
@layershifter layershifter deleted the fix/popper-compare-with-body branch September 24, 2019 09:01
layershifter added a commit that referenced this pull request Sep 26, 2019
layershifter added a commit that referenced this pull request Oct 1, 2019
* fix(Popper): fix comparison for `scrollParent`

* add changelog

(cherry picked from commit 15db9b8)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧰 fix Introduces fix for broken behavior. 🚀 ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Popup: Positioning sometimes outside of the viewport/window
2 participants