Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect focus on 'persistent': true #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix incorrect focus on 'persistent': true #94

wants to merge 1 commit into from

Conversation

smaury
Copy link

@smaury 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.

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.
@hsyntnc
Copy link

hsyntnc commented Apr 3, 2018

You rock bro!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants