-
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
Show UI on text selection #861
Conversation
I love how this works. 👍 👍 from me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Job 🚢
|
||
this.setState( { | ||
empty: ! content || ! content.length, | ||
} ); | ||
|
||
if ( this.props.focus.collapsed !== collapsed ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we expect focus
to ever be undefined
at this point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If somehow the editor is active and the block is not selected, then yes. Maybe getBlockFocus
should return an empty object in that case? Or not? Cc @youknowriad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It think this is possible when the editor become active (before the rerender), it's worth checking IMO. good catch @aduth
See #712.