-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fixed image add link input disappears issue #5942
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,7 +120,8 @@ class ObserveTyping extends Component { | |
|
||
// Abort early if already typing, or key press is incurred outside a | ||
// text field (e.g. arrow-ing through toolbar buttons). | ||
if ( isTyping || ! isTextField( target ) ) { | ||
// Ignore typing in a block toolbar | ||
if ( isTyping || ! isTextField( target ) || target.closest( '.editor-block-toolbar' ) ) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand this was merged because it's a bug, but we should be more explicit about when typing should and should not be triggered. It may well be that this is the correct approach to look for a toolbar ancestor, though could also be that it's a single fix to a larger problem. Are there other text fields in editor which shouldn't trigger One such example on a quick glance is the inserter search for the default block, where the inserter button inexplicably disappears upon typing: I originally liked that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think triggering isTyping in that case is the correct behavior. -- But I understand that wrapping only the |
||
return; | ||
} | ||
|
||
|
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.
Files should end in newline.
Tip: Enforced automatically if installing an EditorConfig plugin.