mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-10 19:05:31 +00:00
change(common/core/web): includes review suggestion
This commit is contained in:
parent
dabd425003
commit
9d5db8a345
1 changed files with 2 additions and 2 deletions
|
|
@ -288,8 +288,8 @@ namespace com.keyman.text {
|
|||
|
||||
this.text = text ? text : "";
|
||||
var defaultLength = this.text._kmwLength();
|
||||
// An index of 0 should still be considered 'defined', while null and undefined... not so much.
|
||||
this.caretIndex = (caretPos || caretPos === 0) ? caretPos : defaultLength;
|
||||
// Ensures that `caretPos == 0` is handled correctly.
|
||||
this.caretIndex = typeof caretPos == "number" ? caretPos : defaultLength;
|
||||
}
|
||||
|
||||
// Clones the state of an existing EditableElement, creating a Mock version of its state.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue