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

Always pass focus props to setFocus #1027

Merged
merged 2 commits into from
Jun 8, 2017
Merged

Always pass focus props to setFocus #1027

merged 2 commits into from
Jun 8, 2017

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Jun 5, 2017

This fixes an issue where the toolbar does not hide when typing in a quote block or table. Somehow I don't like that this is the responsibility of the block implementor but yeah. :)

@@ -26,7 +26,7 @@ registerBlockType( 'core/code', {
return (
<TextareaAutosize
value={ attributes.content }
onFocus={ setFocus }
onFocus={ () => setFocus( {} ) }
Copy link
Member Author

Choose a reason for hiding this comment

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

Avoid passing a SyntheticEvent.

Copy link
Member

Choose a reason for hiding this comment

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

Avoid passing a SyntheticEvent.

Should this be added as an inline comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

After 3f65f3c, it doesn't even seem necessary anymore.

@aduth
Copy link
Member

aduth commented Jun 6, 2017

Somehow I don't like that this is the responsibility of the block implementor but yeah. :)

Related: #878

@ellatrix ellatrix force-pushed the fix/hide-toolbar-type branch from 53b415e to 6bf7942 Compare June 7, 2017 12:55
@ellatrix ellatrix force-pushed the fix/hide-toolbar-type branch from 6bf7942 to 90e7f70 Compare June 7, 2017 13:03
@ellatrix ellatrix requested a review from aduth June 7, 2017 13:47
@aduth
Copy link
Member

aduth commented Jun 7, 2017

Do you need a fresh review here? Unclear if anything's changed since my last approval.

@ellatrix
Copy link
Member Author

ellatrix commented Jun 7, 2017

Sorry, I left a comment (#1027 (comment)) and made a commit.

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Still looks good 👍

@ellatrix ellatrix merged commit 8cffb63 into master Jun 8, 2017
@ellatrix ellatrix deleted the fix/hide-toolbar-type branch June 8, 2017 19:30
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.

2 participants