Fix incorrect focus on 'persistent': true #94

Open
wants to merge 1 commit into
from

Projects

None yet

1 participant

smaury commented Feb 19, 2016

If persistent is set to true this code is executed:
497 - self._processKey('', false);
Then at the end of Formatter.prototype._processKey this code is executed with ignoreCaret not set so it's Undefined:
647 - this._formattValue(ignoreCaret);
Finally this code who changes screen position, if ignoreCaret is False or Undefined, is executed:
694 - inptSel.set(this.el,this.newPos);

So it's enough to change line 497 to self._processKey('', false, true); to fix this.

@smaury smaury Fix incorrect focus on 'persistent': true
If persistent is set to true this code is executed:
497 - self._processKey('', false);
Then at the end of Formatter.prototype._processKey this code is executed with ignoreCaret not set so it's Undefined:
647 - this._formattValue(ignoreCaret);
Finally this code who changes screen position, if ignoreCaret is False or Undefined, is executed:
694 - inptSel.set(this.el,this.newPos);

So it's enough to change line 497 to self._processKey('', false, true); to fix this.
a9aba39
@mort3za mort3za added a commit to mort3za/formatterjs2 that referenced this pull request Aug 3, 2016
@mort3za mort3za Used the code of these pull requests on previous repo: #94 #91 #83 #82 29781be
@mort3za mort3za added a commit to mort3za/formatterjs2 that referenced this pull request Aug 3, 2016
@mort3za mort3za Used the code of these pull requests on previous repo: #94 #91 #83 #82
…#76 #70.

+build
ab5a32b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment