Closed
Bug 319935
Opened 19 years ago
Closed 19 years ago
iframe.contentWindow.focus() on designMode iframe doesn't make caret visible
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 306267
People
(Reporter: grig, Assigned: mozeditor)
References
()
Details
(Keywords: regression, testcase)
Attachments
(1 file, 2 obsolete files)
483 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
when my HTML editor loads it should focus in an editable area. Actually it does, but cursor is hidden so an user cannot find out what is the currently selected place to type in.
Reproducible: Always
Steps to Reproduce:
To see this bug on the login page please type:
- login = admin
- password = qwerty
- knowledgebase = Demo_for_kern
Login into the system. Setup - System(second level tab) - Edit Header Text.
The editor opens. It's possible to write some text there, but cursor is absolutely not visible unless an user clicks on editable area.
Reporter | ||
Updated•19 years ago
|
Version: unspecified → Trunk
Updated•19 years ago
|
Summary: iframe.contentWindow.focus() doesn't work properly → iframe.contentWindow.focus() doesn't make caret visible
Comment 1•19 years ago
|
||
I can reproduce the problem on http://www.supportwizard.com:8080/gui2/login.jsp, but it works correctly for me with a simple example. A simple testcase that demonstrates the problem (rather than instructions for using a huge web application that demonstrates the problem) would be helpful.
Summary: iframe.contentWindow.focus() doesn't make caret visible → iframe.contentWindow.focus() on designMode iframe doesn't make caret visible
Comment 2•19 years ago
|
||
I'll try to simplify this.
Comment 3•19 years ago
|
||
Attachment #205669 -
Attachment is obsolete: true
Comment 4•19 years ago
|
||
I think the problem has to do with setting designMode to "on" and then using document.write. (It's not obvious from the original code that this happens, but it does.) The workaround for this bug is to do things in a more sane order, or to use innerHTML instead. It's not obvious to me that designMode should be preserved at all when using document.write to create a new document.
In the original, the caret appears after you type a letter, whereas in this testcase, it doesn't appear unless you click. I don't know why this difference exists; hopefully it's the same bug the whole time.
Attachment #205673 -
Attachment is obsolete: true
Updated•19 years ago
|
Assignee: nobody → mozeditor
Status: UNCONFIRMED → NEW
Component: General → Editor
Ever confirmed: true
Product: Firefox → Core
QA Contact: general
Version: Trunk → 1.8 Branch
Reporter | ||
Comment 5•19 years ago
|
||
Many thanks for the explanation, the things are getting clearer to me.
Then another question is: if document.write() is deprecated why does the browser not report about such wrong usages in log console? Would you add this to the browser code?
Comment 6•19 years ago
|
||
Seems to have the same regression range as mentioned in bug 306267.
Keywords: regression,
testcase
Comment 7•19 years ago
|
||
I'm not saying document.write is deprecated. I'm just saying that setting document.designMode to "on" and *then* using document.write (which creates a *new* document) is a strange way to use document.designMode, and changing the site to use a less strange method is one way to work around the bug in Firefox.
Comment 8•19 years ago
|
||
I think this bug affects vBulletin (bug 306267) and netscape.com (bug 320355) in addition to supportwizard.com (this bug). It has confused at least one user to the point that they thought they couldn't compose an email message, until I suggested that they try typing despite not being able to see a caret.
Flags: blocking1.8.0.1?
Comment 9•19 years ago
|
||
Looking at the testcase in bug 306267 again, I can see that the testcase here is equivalent. So this is a dup of bug 306267.
*** This bug has been marked as a duplicate of 306267 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Flags: blocking1.8.0.1?
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•