Skip to content
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

Merged
merged 1 commit into from
May 23, 2017
Merged

Show UI on text selection #861

merged 1 commit into from
May 23, 2017

Conversation

ellatrix
Copy link
Member

See #712.

@ellatrix ellatrix requested a review from youknowriad May 22, 2017 12:38
@mtias mtias added [Feature] Blocks Overall functionality of blocks [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable labels May 22, 2017
@ellatrix ellatrix requested a review from jasmussen May 22, 2017 21:21
@jasmussen
Copy link
Contributor

I love how this works. 👍 👍 from me!

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Job 🚢

@ellatrix ellatrix merged commit 5781400 into master May 23, 2017
@ellatrix ellatrix deleted the add/selection-shows-ui branch May 23, 2017 08:51

this.setState( {
empty: ! content || ! content.length,
} );

if ( this.props.focus.collapsed !== collapsed ) {
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants