Open marksalpeter opened 9 years ago
@damirsel doesn't work for me. With this code I'm unable to type on mobile completely.
Fix doesn't work for me either.
@damirsel thanks .. it works very well for me.. (with some improvements, because the var names are different)
Mobile Chrome browser and other browsers based on mobile Chrome don't recognize keypress event, so you need to put new 'input' event listener that will listen to keys pressed
inside function Formatter(el, opts) put following code:
utils.addListener(self.el, 'input', function (evt) { self._keyPress(evt); if (self.el != null) { if (self.el.createTextRange) { var range = self.el.createTextRange(); range.move('character', self.el.value.length); range.select(); } else { if(self.el.selectionStart) { self.el.focus(); self.el.setSelectionRange(self.el.value.length, self.el.value.length); } else { self.el.focus(); } } } });