/src/main/java/org/htmlunit/html/impl/SelectableTextSelectionDelegate.java
selectionStart = Math.max( 0, Math.max( selectionStart, length) ) ;
selectionStart = Math.max ( 0, Math.min ( selectionStart, length ) ) ;
if (selectionStart < 0 && element_.getPage().getEnclosingWindow().getWebClient() .getBrowserVersion().hasFeature(JS_INPUT_IGNORE_NEGATIVE_SELECTION_START)) { return; } final int length = element_.getText().length(); <extra_id_0> selection_.setStart((DomNode) element_, selectionStart); if (selection_.getEndOffset() < selectionStart) { selection_.setEnd((DomNode) element_, selectionStart); } } @Override