Fix blurring the editor when no hidden input is present

This commit is contained in:
Antonio Scandurra
2017-05-11 10:49:47 +02:00
parent dc6653ffa6
commit a0ed201fe8

View File

@@ -1421,7 +1421,8 @@ class TextEditorComponent {
// listener to be fired, even if other listeners are bound before creating
// the component.
didBlur (event) {
if (event.relatedTarget === this.refs.cursorsAndInput.refs.hiddenInput) {
const {cursorsAndInput} = this.refs
if (cursorsAndInput && event.relatedTarget === cursorsAndInput.refs.hiddenInput) {
event.stopImmediatePropagation()
}
}