Skip to content

Conversation

@luin
Copy link
Member

@luin luin commented Jan 4, 2023

Breaking Change: This PR moves scrollIntoView from selection to quill to make it easier to be overridden. The only reason scrollIntoView was in selection seems to be the usage of lastRange but in quill we already use this.selection.lastRange. On second thought I think semantically it makes sense to keep it in the selection module.

Also not sure why if (first == null || last == null) return; is needed so this PR removes it.

@luin luin force-pushed the zh-demo-selection branch 2 times, most recently from 2ea6fdc to b108687 Compare January 9, 2023 03:41
@luin luin changed the title Move scrollIntoView to Quill Only scroll editor upon focus if element fits in viewport Jan 9, 2023
@luin luin force-pushed the zh-demo-selection branch from b108687 to cfbd167 Compare January 9, 2023 04:30
@luin luin changed the title Only scroll editor upon focus if element fits in viewport Refactor Selection#scrollIntoView() Jan 9, 2023
@luin luin marked this pull request as ready for review January 9, 2023 04:57
@jhchen jhchen merged commit d2f689f into develop Jan 14, 2023
@jhchen jhchen deleted the zh-demo-selection branch January 14, 2023 00:23
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.

3 participants