mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-21 06:30:59 +00:00
Dblclick at end of word selects previous word
Fixes selectWord so that double clicking at the end of a word (just after the last character in the left half of the space) selects the previous word. Again this is MS Word behaviour.
This commit is contained in:
parent
1499baa7c3
commit
a2cf96a020
1 changed files with 1 additions and 1 deletions
|
|
@ -257,7 +257,7 @@
|
|||
* @param {Number} direction: 1 or -1
|
||||
*/
|
||||
searchWordBoundary: function(selectionStart, direction) {
|
||||
var index = selectionStart;
|
||||
var index = (this._reSpace.test(this.text.charAt(selectionStart))) ? selectionStart-1 : selectionStart;
|
||||
var _char = this.text.charAt(index);
|
||||
var reNonWord = /[ \n\.,;!\?\-]/;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue