-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
onReplace: select the last block #13294
Merged
Merged
Conversation
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
ellatrix
force-pushed
the
try/replace-select-last
branch
from
January 11, 2019 17:30
54b0ed0
to
e05db07
Compare
ellatrix
added
[Feature] Paste
[Feature] Writing Flow
Block selection, navigation, splitting, merging, deletion...
labels
Jan 11, 2019
aduth
reviewed
Jan 11, 2019
I think this might still be a small but significant user XP improvement to add for the next release. I'll look at the tests shortly. |
ellatrix
requested review from
gziolo,
noisysocks,
talldan and
youknowriad
as code owners
February 18, 2019 12:22
mcsf
approved these changes
Feb 18, 2019
Thank you @mcsf! |
youknowriad
reviewed
Feb 18, 2019
youknowriad
pushed a commit
that referenced
this pull request
Mar 6, 2019
* onReplace: select the last block * Update tests * Add second test to cover cases of REPLACE_BLOCKS
youknowriad
pushed a commit
that referenced
this pull request
Mar 6, 2019
* onReplace: select the last block * Update tests * Add second test to cover cases of REPLACE_BLOCKS
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partly fixes #5317. Currently
onReplace
sets the block selection to the first block. This makes it so thatonReplace
sets it to the last block, so when you paste some blocks, the selection is set to the last block.This seems to be a good default for
onReplace
in general, rather than selecting the first block.I also tried setting
initialPosition
to-1
, but that resulted in some failing tests for the quote block. Because it has two input fields, selection would be set to the cite field when creating a quote block through the/quote
shortcut.So this PR is not a complete fix, but it alleviates the issue.