Skip to content
Snippets Groups Projects
Commit 42c58e90 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

set cursor to start of textbox when focusing FS#2243

This works around a new "feature/bug" of Firefox 4.
parent d041f8db
No related branches found
No related tags found
No related merge requests found
......@@ -300,7 +300,11 @@ addInitEvent(function (){
if(edit_text) {
if(edit_text.readOnly) return;
// set focus
// set focus and place cursor at the start
var sel = getSelection(edit_text);
sel.start = 0;
sel.end = 0;
setSelection(sel);
edit_text.focus();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment