Writing Flow: Redirect click below editor to last text field #5541
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.
Supersedes #5493
This pull request seeks to apply some of the ideas from #5493, albeit at a more limited scope. It seeks to turn the entire block list column into a clickable text target, effectively equivalent to the default block appender spanning the entire viewport height of the editable canvas. In the process, it reverts #5199; when the last block is a text block, clicking below the text editor moves the text caret to the last block aligned at the X coordinate of the click. This should feel very familiar to the experience of a word processor like Google Docs.
The behavior is complemented well by #5417, where clicking into and out of the default appended block is quite seamless.
As with #5493, the effect is difficult to describe, and is better experienced live.
Given the revert of #5199, this does conflict with the proposed goals of #5478, where with these changes we cannot assume that the default block appender will always be present at the end of content.
Testing instructions:
Verify that clicking below the last block appends a new text block if the last block is not already a paragraph block.
If the last block is a paragraph block, verify that clicking below the block aligns the text caret corresponding to the X coordinate of the click.
Verify that you can still clear the selected block by clicking to the left or right of the area below the block list (where the cursor changes from
cursor: text
tocursor: default
).Repeat above instructions in various viewport sizes† and content length.
† The effect doesn't work at small viewports, because the editor does not occupy the full height until reaching 600px or wider because of this style. We should consider how we can otherwise allow the editor to occupy the full height on small viewport sizes. I expect "click below to clear" currently doesn't work either, in master.