react-draft-wysiwyg
Advanced tools
Comparing version 1.12.4 to 1.12.5
@@ -111,2 +111,5 @@ # Changelog | ||
- #514, Avoid error when an alignment is not defined. | ||
- #555, Image preview option. | ||
- #555, Image preview option. | ||
## 15/1/2017 | ||
- #549, stripPastedStyles not working. |
{ | ||
"name": "react-draft-wysiwyg", | ||
"version": "1.12.4", | ||
"version": "1.12.5", | ||
"description": "A wysiwyg on top of DraftJS.", | ||
@@ -5,0 +5,0 @@ "main": "dist/react-draft-wysiwyg.js", |
@@ -175,3 +175,4 @@ /* @flow */ | ||
}); | ||
if (onFocus && this.focusHandler.isEditorFocused()) { | ||
const editFocused = this.focusHandler.isEditorFocused(); | ||
if (onFocus && editFocused) { | ||
onFocus(event); | ||
@@ -364,5 +365,4 @@ } | ||
handlePastedText = (text, html) => { | ||
if (this.props.handlePastedText && | ||
this.props.handlePastedText(text, html, editorState, this.onChange)) { | ||
return true; | ||
if (this.props.handlePastedText) { | ||
return this.props.handlePastedText(text, html, editorState, this.onChange); | ||
} | ||
@@ -374,3 +374,3 @@ const { editorState } = this.state; | ||
preventDefault: Function = (event: Object) => { | ||
if (event.target.tagName === 'INPUT') { | ||
if (event.target.tagName === 'INPUT' || event.target.tagName === 'LABEL') { | ||
this.focusHandler.onInputMouseDown(); | ||
@@ -377,0 +377,0 @@ } else { |
@@ -14,6 +14,8 @@ export default class FocusHandler { | ||
isEditorBlur = (event):void => { | ||
if (event.target.tagName === 'INPUT' && !this.editorFocused) { | ||
if ((event.target.tagName === 'INPUT' || event.target.tagName === 'LABEL') | ||
&& !this.editorFocused) { | ||
this.inputFocused = false; | ||
return true; | ||
} else if (event.target.tagName !== 'INPUT' && !this.inputFocused) { | ||
} else if ((event.target.tagName === 'INPUT' || event.target.tagName === 'LABEL') | ||
&& !this.inputFocused) { | ||
this.editorFocused = false; | ||
@@ -20,0 +22,0 @@ return true; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1189314
113
26443