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:
parent
6f09cc1cc2
commit
1362383aea
3 changed files with 3 additions and 3 deletions
|
@ -1436,7 +1436,7 @@ proto._updatePath = function ( range, force ) {
|
||||||
this.fireEvent( 'pathChange', { path: newPath } );
|
this.fireEvent( 'pathChange', { path: newPath } );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( anchor !== focus ) {
|
if ( !range.collapsed ) {
|
||||||
this.fireEvent( 'select' );
|
this.fireEvent( 'select' );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -341,7 +341,7 @@ proto._updatePath = function ( range, force ) {
|
||||||
this.fireEvent( 'pathChange', { path: newPath } );
|
this.fireEvent( 'pathChange', { path: newPath } );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( anchor !== focus ) {
|
if ( !range.collapsed ) {
|
||||||
this.fireEvent( 'select' );
|
this.fireEvent( 'select' );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue