Skip to content

Commit c0231ad

Browse files
committed
fix(cursor): update deprecated event creation
1 parent bbf629d commit c0231ad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/cursor.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,7 @@ export default class Cursor {
350350
// This is to prevent excessive triggering of the change event during
351351
// merge or split operations or other manipulations by scripts.
352352
triggerChange () {
353-
const event = document.createEvent('HTMLEvents')
354-
event.initEvent('formatEditable', true, false)
353+
const event = new Event('formatEditable', {bubbles: true, cancelable: false})
355354
this.host.dispatchEvent(event)
356355
}
357356
}

0 commit comments

Comments
 (0)