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:
committed by
Ian Storm Taylor
parent
0746582cc4
commit
4e01f80b1b
@@ -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
|
||||
|
Reference in New Issue
Block a user