Last Comment Bug 308736 - Caret is invisible when entering an empty designmode field.
: Caret is invisible when entering an empty designmode field.
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla1.9.2a1
Assigned To: Peter Van der Beken [:peterv]
: Makoto Kato [:m_kato]
: 395965 (view as bug list)
Depends on: 503531 561584
Blocks: contenteditable 395965 424615
  Show dependency treegraph
Reported: 2005-09-15 15:56 PDT by Egon Knapen
Modified: 2010-04-24 16:14 PDT (History)
13 users (show)
pavlov: blocking1.9-
peterv: in‑testsuite?
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Testcase (629 bytes, text/html)
2009-06-05 05:51 PDT, Peter Van der Beken [:peterv]
no flags Details
v1 (1.53 KB, patch)
2009-06-05 06:06 PDT, Peter Van der Beken [:peterv]
roc: review+
roc: superreview+
Details | Diff | Splinter Review

Description User image Egon Knapen 2005-09-15 15:56:49 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4

When an designmode field is still empty when you enter by clicking the mouse in
it, you don't see a cursor. The cursor will appear only after you start typing

Reproducible: Always

Steps to Reproduce:
1. visit the site,
2. click 'view source'
3. delete everything
4. unclick 'view source' (remove check)
5. click with mouse in textfield

Actual Results:  
You don't see a focus or an blinking cursor. Or any cursor what so ever...

Expected Results:  
In a normal textfield or textarea, when you it gets the focus, you see a
blinking cursor.

Problem happens under Windows XP, but also under MacOSX (Tiger), with using
Firefox 1.5 beta 1 or Camino 1.0a1.
Comment 1 User image Jacob Torrey 2005-09-15 16:39:34 PDT
WFM, Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908
Firefox/1.4 ID:2005090806 However, the cursor is very very small, making it hard
to see, still a bug, but not the same as decribed.
Comment 2 User image Egon Knapen 2005-09-15 23:49:35 PDT
No it's not visible. That other one is when there is text, and you move the
cursor totally to the beginning, then I see a very small cursor.

Both are bugs I think that should be finished!
Comment 3 User image José Jeria 2005-09-16 05:40:25 PDT
See this as well with 20050916 branch build
Comment 4 User image zug_treno 2005-09-16 08:44:50 PDT
Reproducible (no cursor) with SeaMonkey/20050904/1.1a, I see a very small cursor
with SeaMonkey/20050907/1.1a.
Comment 5 User image zug_treno 2005-09-16 09:12:00 PDT
Oops, now I also see the very small cursor with SeaMonkey/20050904/1.1a so my
comment 4 is incorrect, sorry.
Comment 6 User image Egon Knapen 2005-09-29 00:03:53 PDT
The DesignMode has been a big improvement in the 1.5beta2 over the 1.0.6 version
of firefox, but this small or invisible cursor is really something that should
get quickly fixed, to make it a perfect designmode....
Comment 7 User image José Jeria 2005-12-31 05:14:23 PST
Same on trunk/win xp --> trunk
Comment 8 User image Dirk Schippers 2007-04-18 00:31:42 PDT
The cursor is also invisible when a text-area or design mode is used above a transparent layer (see bug 343240).

Afaik it was fixed in 1.5 but is still not fixed in 2.0.
When will this be fixed? (please?)
Comment 9 User image Chris Pearce (:cpearce) 2007-10-31 20:35:45 PDT
This now works for me [Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9a9pre) Gecko/2007102510 Minefield/3.0a9pre].
Comment 10 User image Egon Knapen 2007-11-01 01:55:25 PDT
Under latest night build 3.0a9pre (1.Nov) it is visible. But it's very small...

Same when in there is text, and you go to the last line, it sometimes is small too. Still same behaviour as in
Comment 11 User image Boris Zbarsky [:bz] (still a bit busy) 2007-11-01 11:15:50 PDT
Reopening per comment 10.
Comment 12 User image Chris Pearce (:cpearce) 2007-11-05 12:50:10 PST
Oh I see, the problem is that when you delete everything in view source mode, there's *nothing* left in the iframe. When we draw the caret in an empty iframe, the caret is offset vertically, that's why we always add a <br> tag to an empty iframe.

We need to either:
1. Fix the caret drawing/positioning code when it's drawn in an *empty* iframe document.
2. Add a <br> to the iframe when all its content is deleted.

Taking bug.
Comment 13 User image Peter Van der Beken [:peterv] 2009-06-05 05:51:09 PDT
Created attachment 381760 [details]
Comment 14 User image Peter Van der Beken [:peterv] 2009-06-05 05:55:02 PDT
*** Bug 395965 has been marked as a duplicate of this bug. ***
Comment 15 User image Peter Van der Beken [:peterv] 2009-06-05 06:06:07 PDT
Created attachment 381763 [details] [diff] [review]
Comment 16 User image Peter Van der Beken [:peterv] 2009-06-21 10:53:54 PDT
Comment 17 User image Sylvain Pasche 2009-07-10 09:34:12 PDT
This caused bug 503531

Note You need to log in before you can comment on or make changes to this bug.