private static RichTextAreaImpl impl = GWT.create(RichTextAreaImpl.class);
public int getTextAreaCursorPos(Element elem)
{
return getCursorPos(elem);
}
public int getCursorPos()
{
return getTextAreaCursorPos(getElement());
}
protected RichTextAreaImpl getImpl()
{
return impl;
}
public native int getCursorPos(Element elem)
/*-{
// Guard needed for FireFox.
try{
return elem.selectionStart;
} catch (e) {
return 0;
}
}-*/;
but due to JSNI I can't figure out what's going on with selectionStart.
elem.selectionStart returns always 0
Please any idea? Thank you!!!