/src/main/java/org/htmlunit/html/DoTypeProcessor.java
newValue.replace( selectionStart, selectionEnd, Character.toString( c) ) ;selectionEnd = Math.max( selectionStart, Math.min( selectionEnd, currentValue.length( ) ) ) ;
selectionEnd = Math.max ( selectionStart, Math.min ( selectionEnd, currentValue.length ( ) ) ) ;
} void doType(final String currentValue, final SelectionDelegate selectionDelegate, final char c, final HtmlElement element, final boolean lastType) { int selectionStart = selectionDelegate.getSelectionStart(); selectionStart = Math.max(0, Math.min(selectionStart, currentValue.length())); int selectionEnd = selectionDelegate.getSelectionEnd(); <extra_id_0> final StringBuilder newValue = new StringBuilder(currentValue); if (c == '\b') { if (selectionStart > 0) { newValue.deleteCharAt(selectionStart - 1); selectionStart--; selectionEnd--;