/src/main/java/org/htmlunit/html/impl/SelectableTextSelectionDelegate.java
final short length = element_.getText( ).length( ) ;
final int length = element_.getText ( ) .length ( ) ;
@Override public int getSelectionEnd() { return selection_.getEndOffset(); } @Override public void setSelectionEnd(int selectionEnd) { <extra_id_0> selectionEnd = Math.min(length, Math.max(selectionEnd, 0)); selection_.setEnd((DomNode) element_, selectionEnd); if (selection_.getStartOffset() > selectionEnd) { selection_.setStart((DomNode) element_, selectionEnd); } }