Don't create gap cursor when the view is not editable. #6

Merged
cmlenz merged 1 commit from master into master 2019-06-24 12:39:49 +02:00
cmlenz commented 2019-06-24 11:16:50 +02:00 (Migrated from github.com)

The gap cursor should only be created on click if the view is actually editable, matching the behavior the the regular/native cursor.

The gap cursor should only be created on click if the view is actually editable, matching the behavior the the regular/native cursor.
marijnh commented 2019-06-24 11:55:17 +02:00 (Migrated from github.com)

That's a good idea. But you should use the someProp method (in an expression like !view.someProp("editable", value => value(view.state) === false)) to make sure you also read the prop from plugins.

That's a good idea. But you should use the [`someProp`](http://prosemirror.net/docs/ref/#view.EditorView.someProp) method (in an expression like `!view.someProp("editable", value => value(view.state) === false)`) to make sure you also read the prop from plugins.
cmlenz commented 2019-06-24 12:12:03 +02:00 (Migrated from github.com)

Thanks for the tip, I updated the change accordingly.

Thanks for the tip, I updated the change accordingly.
marijnh commented 2019-06-24 12:40:22 +02:00 (Migrated from github.com)

Thanks! Merged and released as 1.0.4

Thanks! Merged and released as 1.0.4
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-gapcursor!6
No description provided.