0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 15:23:29 -05:00

Fire "select" event whenever selected range is not collapsed

Fixes #50.
This commit is contained in:
Neil Jenkins 2015-03-18 18:17:12 +08:00
parent 6f09cc1cc2
commit 1362383aea
3 changed files with 3 additions and 3 deletions

View file

@ -1436,7 +1436,7 @@ proto._updatePath = function ( range, force ) {
this.fireEvent( 'pathChange', { path: newPath } );
}
}
if ( anchor !== focus ) {
if ( !range.collapsed ) {
this.fireEvent( 'select' );
}
};

File diff suppressed because one or more lines are too long

View file

@ -341,7 +341,7 @@ proto._updatePath = function ( range, force ) {
this.fireEvent( 'pathChange', { path: newPath } );
}
}
if ( anchor !== focus ) {
if ( !range.collapsed ) {
this.fireEvent( 'select' );
}
};