-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Detect non-window element resize #918
Conversation
a7b301b
to
41c783c
Compare
Codecov Report
@@ Coverage Diff @@
## master #918 +/- ##
==========================================
- Coverage 89.93% 89.87% -0.07%
==========================================
Files 57 57
Lines 1620 1630 +10
==========================================
+ Hits 1457 1465 +8
- Misses 163 165 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think this is fine for a bugfix.
} | ||
if (scrollElement === window) { | ||
window.removeEventListener('resize', this._onResize, false); | ||
} else if (this._detectElementResize && scrollElement) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't handle the case where the scrollElement
prop changes from window
to !window
(or vice versa) within the life of the instance. I don't know if that's ever going to actually happen though. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
We can use now or in the future resize-observer-polyfill. It's quite nice and have types. However not sure its strategy is also efficient as current implementation. Chrome promises to enable it by default in 64. |
Yeah. I make mention of maybe using that in the next major release in the
umbrella notes issue. Need to think about it more before deciding for
certain.
…On Tue, Dec 26, 2017 at 9:51 PM Bogdan Chadkin ***@***.***> wrote:
We can use now or in the future
https://github.com/que-etc/resize-observer-polyfill
<http://resize-observer-polyfill>. It's quite nice and have types.
However not sure its strategy it is also efficient as current
implementation.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#918 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABzncbcxQN32_p2Ea1H8lT8MI3dYYdLks5tEdrZgaJpZM4RM9Pq>
.
|
4ccf3d5
to
71c510f
Compare
71c510f
to
7f72c44
Compare
@bvaughn can this feature be minor?