#10678 closed defect (fixed)
Editor: programmatic widget creation doesn't like focusOnLoad
Reported by: | Douglas Hays | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | Editor | Version: | 1.4.0 |
Keywords: | Cc: | Jared Jurkiewicz | |
Blocked By: | Blocking: |
Description
The focusOnLoad:true boolean doesn't work well with programmatic Editor creation. It works on Firefox, but fails with IE and WebKit?.
Attachments (2)
Change History (11)
Changed 11 years ago by
Attachment: | focusOnLoadBug.html added |
---|
comment:1 Changed 11 years ago by
Cc: | Jared Jurkiewicz added |
---|---|
Milestone: | tbd → 1.5 |
Needs review by jaredj
comment:2 Changed 11 years ago by
Related problem: It's common for Editor widgets to be created programmatically and then followed by a call to focus() (InlineEditBox/Dialog?). Even if the focus() call is in a setTimeout, the Editor may not have finished loading yet. Editor's focus() method needs to check for isLoaded and possibly queue the focus.
comment:3 Changed 11 years ago by
Another related issue: Editor's focus method sometimes does a placeCursorAtStart (non-IE). But related to the original problem in this ticket, the call to placeCursorAtStart needs to happen for IE also, and in addition, it should happen anytime setValue is called since this effectively resets the caret position.
comment:4 Changed 11 years ago by
The 2nd problem above can be seen by running test_InlineEditBox.html, locate the Editor test near the bottom and click the text. The input caret is not seen (tested Chrome 4, FF 3, and IE 7.
the last problem can be seen by running test_InlineEditBox.html with Chrome. Click the text and an Editor widget is created. Click cancel, and then click the text again. This time, an Editor widget is NOT created but just setValue is called on an existing Editor widget and then focus() but placeCursorAtStart should have been called but wasn't.
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
simple testcase