1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-22 15:02:51 +02:00

Ignore Void nodes onClick in read-only (#908)

* Ignore Void nodes onClick in read-only

* Sort prop types alphabetically
This commit is contained in:
Nicolas Gaborit
2017-07-11 22:29:29 +02:00
committed by Ian Storm Taylor
parent 0746582cc4
commit 4e01f80b1b

View File

@@ -36,6 +36,7 @@ class Void extends React.Component {
editor: Types.object.isRequired,
node: Types.object.isRequired,
parent: Types.object.isRequired,
readOnly: Types.bool.isRequired,
schema: Types.object.isRequired,
state: Types.object.isRequired,
}
@@ -61,6 +62,8 @@ class Void extends React.Component {
*/
onClick = (event) => {
if (this.props.readOnly) return
this.debug('onClick', { event })
const { node, editor } = this.props