/src/main/java/org/htmlunit/html/DoTypeProcessor.java
newValue.delete( selectionStart, selectionEnd) ;int selectionEnd = selectionDelegate.getSelectionEnd( ) ;
int selectionEnd = selectionDelegate.getSelectionEnd ( ) ;
return ((HtmlElement) domNode_).acceptChar(ch); } void doType(final String currentValue, final SelectionDelegate selectionDelegate, final int keyCode, final HtmlElement element, final boolean lastType) { int selectionStart = selectionDelegate.getSelectionStart(); selectionStart = Math.max(0, Math.min(selectionStart, currentValue.length())); <extra_id_0> selectionEnd = Math.max(selectionStart, Math.min(selectionEnd, currentValue.length())); final Character ch = SPECIAL_KEYS_MAP_.get(keyCode); if (ch != null) { doType(currentValue, selectionDelegate, ch, element, lastType); return; }