You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When highlighting a portion of the text, the delete key does not work.
I modified the code to not ignore partially highlighted text and I did not find any negative impacts.
Here is the modified code below. Can you tell me if there is a problem with doing it this way?
InputHandler.prototype.handleKeydown = function (event) {
var keyCode = event.which || event.charCode || event.keyCode;
if (keyCode == 8 || keyCode == 46 || keyCode == 63272) {
event.preventDefault();
var selectionRangeLength = Math.abs(this.inputService.inputSelection.selectionEnd - this.inputService.inputSelection.selectionStart);
if (selectionRangeLength >= (this.inputService.rawValue.length - this.inputService.prefixLength())) {
this.clearValue();
} else {
this.inputService.removeNumber(keyCode);
this.onModelChange(this.inputService.value);
}
}
};
The text was updated successfully, but these errors were encountered:
nbfontana
changed the title
Clicking delete with a portion of the text highlighted
[BUG] Clicking delete with a portion of the text highlighted
May 21, 2019
When highlighting a portion of the text, the delete key does not work.
I modified the code to not ignore partially highlighted text and I did not find any negative impacts.
Here is the modified code below. Can you tell me if there is a problem with doing it this way?
The text was updated successfully, but these errors were encountered: