Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Other: DocumentSelection#event:change:marker should be fired just a…
Browse files Browse the repository at this point in the history
…fter a selection range change, like `event:change:attribute`.
  • Loading branch information
scofalik committed Jan 24, 2020
1 parent abff96b commit 98098c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/model/documentselection.js
Original file line number Diff line number Diff line change
Expand Up @@ -733,11 +733,13 @@ class LiveSelection extends Selection {
setTo( selectable, optionsOrPlaceOrOffset, options ) {
super.setTo( selectable, optionsOrPlaceOrOffset, options );
this._updateAttributes( true );
this._updateMarkers();
}

setFocus( itemOrPosition, offset ) {
super.setFocus( itemOrPosition, offset );
this._updateAttributes( true );
this._updateMarkers();
}

setAttribute( key, value ) {
Expand Down Expand Up @@ -873,7 +875,7 @@ class LiveSelection extends Selection {
}

if ( changed ) {
this.fire( 'change:marker', { oldMarkers } );
this.fire( 'change:marker', { oldMarkers, directChange: false } );
}
}

Expand Down

0 comments on commit 98098c8

Please sign in to comment.