You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
35
35
36
36
### Fixed
37
37
- Fix `atStart` was not reporting correctly, in PR [#31](https://github.com/compulim/react-scroll-to-bottom/pull/31)
38
+
- Chrome: Fix scroll to bottom button should hide when using <kbd>TAB</kbd> to scroll the bottommost button into view, in PR [#46](https://github.com/compulim/react-scroll-to-bottom/pull/46)
// We need to update the "scrollHeight" value to latest when the user do a focus inside the box.
212
+
//
213
+
// This is because:
214
+
// - In our code that mitigate Chrome synthetic scrolling, that code will look at whether "scrollHeight" value is latest or not.
215
+
// - That code only run on "scroll" event.
216
+
// - That means, on every "scroll" event, if the "scrollHeight" value is not latest, we will skip modifying the stickiness.
217
+
// - That means, if the user "focus" to an element that cause the scroll view to scroll to the bottom, the user agent will fire "scroll" event.
218
+
// Since the "scrollHeight" is not latest value, this "scroll" event will be ignored and stickiness will not be modified.
219
+
// - That means, if the user "focus" to a newly added element that is at the end of the scroll view, the "scroll to bottom" button will continue to show.
220
+
//
221
+
// Repro in Chrome:
222
+
// 1. Fill up a scroll view
223
+
// 2. Scroll up, the "scroll to bottom" button should show up
224
+
// 3. Click "Add a button"
225
+
// 4. Click on the scroll view (to pseudo-focus on it)
226
+
// 5. Press TAB, the scroll view will be at the bottom
227
+
//
228
+
// Expect:
229
+
// - The "scroll to bottom" button should be gone.
0 commit comments