-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5f4006
commit 11c20e9
Showing
1 changed file
with
59 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With this commit (11c20e9), when new selection is outside of the safe bounds but still within the rect (
container.getBoundingClientRect()
), it will be scrolled to center but I think it's a bit too much.if (bottom - top >= bounds.height || right - left >= bounds.width || right < rect.left || left > rect.right || bottom < rect.top || top > rect.bottom) {
The above is intended change in #1354. When the new selection is completely outside of the rect, it will be scrolled to center.