/src/main/java/org/htmlunit/html/DoTypeProcessor.java
selectionStart = Math.max( 0 , Math.min( selectionStart, currentValue.length( ) ) ) ;
selectionStart = Math.max ( 0, Math.min ( selectionStart, currentValue.length ( ) ) ) ;
} 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(); <extra_id_0> int selectionEnd = selectionDelegate.getSelectionEnd(); 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;