Sherzod Posted November 29, 2022 Share Posted November 29, 2022 Okay, I will check. 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 29, 2022 Share Posted November 29, 2022 I think that would be more correct: Ext.form.field.TextArea.prototype.insertAtCursorUniMemo = function(txt) { var val = this.value, start = this.inputEl.dom.selectionStart, end = this.inputEl.dom.selectionEnd; this.setValue(val.substring(0, start) + txt + val.substring(end)); this.inputEl.dom.selectionStart = this.inputEl.dom.selectionEnd = start + txt.length; this.inputEl.focus(false); }; Ext.form.field.TextArea.prototype.deleteAtCursorUniMemo = function(txt2) { var val = this.getValue(), start = this.inputEl.dom.selectionStart, end = this.inputEl.dom.selectionEnd; this.setValue(val.substring(0, start - 1) + val.substring(end)); this.inputEl.dom.selectionStart = this.inputEl.dom.selectionEnd = start - 1; this.inputEl.focus(false); }; Ext.form.Text.prototype.insertAtCursorUniEdit = function(txt) { var val = this.getValue(), start = this.inputEl.dom.selectionStart, end = this.inputEl.dom.selectionEnd; this.setValue(val.substring(0, start) + txt + val.substring(end)); this.inputEl.dom.selectionStart = this.inputEl.dom.selectionEnd = start + txt.length; this.inputEl.focus(false); }; Ext.form.Text.prototype.deleteAtCursorUniEdit = function(txt2) { var val = this.getValue(), start = this.inputEl.dom.selectionStart, end = this.inputEl.dom.selectionEnd; this.setValue(val.substring(0, start - 1) + val.substring(end)); this.inputEl.dom.selectionStart = this.inputEl.dom.selectionEnd = start - 1; this.inputEl.focus(false); }; 1 Quote Link to comment Share on other sites More sharing options...
fabiotj Posted November 29, 2022 Share Posted November 29, 2022 5 minutes ago, Sherzod said: I think that would be more correct: Ext.form.field.TextArea.prototype.insertAtCursorUniMemo = function(txt) { var val = this.value, start = this.inputEl.dom.selectionStart, end = this.inputEl.dom.selectionEnd; this.setValue(val.substring(0, start) + txt + val.substring(end)); this.inputEl.dom.selectionStart = this.inputEl.dom.selectionEnd = start + txt.length; this.inputEl.focus(false); }; Ext.form.field.TextArea.prototype.deleteAtCursorUniMemo = function(txt2) { var val = this.getValue(), start = this.inputEl.dom.selectionStart, end = this.inputEl.dom.selectionEnd; this.setValue(val.substring(0, start - 1) + val.substring(end)); this.inputEl.dom.selectionStart = this.inputEl.dom.selectionEnd = start - 1; this.inputEl.focus(false); }; Ext.form.Text.prototype.insertAtCursorUniEdit = function(txt) { var val = this.getValue(), start = this.inputEl.dom.selectionStart, end = this.inputEl.dom.selectionEnd; this.setValue(val.substring(0, start) + txt + val.substring(end)); this.inputEl.dom.selectionStart = this.inputEl.dom.selectionEnd = start + txt.length; this.inputEl.focus(false); }; Ext.form.Text.prototype.deleteAtCursorUniEdit = function(txt2) { var val = this.getValue(), start = this.inputEl.dom.selectionStart, end = this.inputEl.dom.selectionEnd; this.setValue(val.substring(0, start - 1) + val.substring(end)); this.inputEl.dom.selectionStart = this.inputEl.dom.selectionEnd = start - 1; this.inputEl.focus(false); }; Works perfect!!! Congratulations Sherzod and thank you so much for your support! Here is the record for use on a virtual keyboard made for Touch monitors that work in self-service Totems. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.