Closed Bug 257581 Opened 20 years ago Closed 20 years ago

Cursor (caret) doesn't appear in MailNews Compose Window, although you type something

Categories

(Core :: DOM: Editor, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: mcsmurf, Assigned: ginnchen+exoracle)

References

Details

(Keywords: regression)

Attachments

(1 file, 4 obsolete files)

To reproduce:
1. Get a nightly build
2. Reply to a mail or news posting
(3. Type something)

Actual Results: No cursor appears

Exspected Results: A cursor should appear
'Clicking' in the Text: Cursor appears.
Change Window(Alt-Tab) and after that go back to the  Mozilla Editpane, the
cursor is gone again.

Bug comes up with nightly 20040831xx 20040830xx works fine.
Ginn: Your patch in Bug 169297 caused this bug here.
Roc: CCing you, since you were the superreviewer of the patch and might be
interested in this (as always, feel free to un-CC again).
Summary: Cursor doesn't appear in MailNews Compose Window, also you type something → Cursor doesn't appear in MailNews Compose Window, although you type something
It seems this happens when you turn off "Caret browsing".
I'm trying to fix it.
Attached patch patch (obsolete) — Splinter Review
Assignee: mozeditor → ginn.chen
Attachment #157599 - Flags: superreview?(roc)
Attachment #157599 - Flags: review?(aaronleventhal)
Comment on attachment 157599 [details] [diff] [review]
patch

This is only a workaround, just like the origin code before fixing bug 169297.
We still have other problems. If we have a browser window and a composer window
at the same time, turning on caret-browsing will cause two cursors blink in two
windows.
Attachment #157599 - Attachment is obsolete: true
Attachment #157599 - Flags: superreview?(roc)
Attachment #157599 - Flags: review?(aaronleventhal)
Attached patch patch v2 (obsolete) — Splinter Review
Comment on attachment 157607 [details] [diff] [review]
patch v2

review?
Attachment #157607 - Flags: superreview?(roc)
Attachment #157607 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 157607 [details] [diff] [review]
patch v2

+  PRInt16 isEditor = 0;

Move this inside the if.
glazman, care to comment on this bug and patch?
Attached patch patch v2.1 (obsolete) — Splinter Review
Attachment #157607 - Attachment is obsolete: true
Attachment #157607 - Flags: superreview?(roc)
Attachment #157607 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #157677 - Flags: superreview?(roc)
Attachment #157677 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 157677 [details] [diff] [review]
patch v2.1


>+  nsIPresShell *shell = mPresContext->GetPresShell();
>+  if (shell) {
>+    PRInt16 displaySelection = 0;
>+    shell->GetSelectionFlags(&displaySelection);
>+    PRBool isEditor = (displaySelection == nsISelectionDisplay::DISPLAY_ALL);
>+    if (isEditor)
>+      return; // Never browse with caret in editor
>+  }
>+

Errrr. I am not sure it's the best way to determine if we have an editor here
or not. You should try to do that through the docShell and nsIEditingSession.
Attachment #157677 - Flags: review?(neil.parkwaycc.co.uk) → review-
Attachment #157677 - Flags: superreview?(roc)
I tried this, but I can always get editSession. So no caret visiable for
caret-browsing now.

+  nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(shellItem);
+  if (docShell) {
+    nsCOMPtr<nsIEditingSession> editSession = do_GetInterface(docShell);
+    if (editSession) {
+      return; // Never browse with caret in editor
+    }
+  }
*** Bug 258019 has been marked as a duplicate of this bug. ***
Attached patch patch v3 (obsolete) — Splinter Review
this one works for me
Attachment #157677 - Attachment is obsolete: true
Comment on attachment 158084 [details] [diff] [review]
patch v3

I found similar code in the same file. review?
Attachment #158084 - Flags: superreview?(roc)
Attachment #158084 - Flags: review?(daniel)
Attached patch patch v3Splinter Review
sorry, I forgot to change the comment
Attachment #158084 - Attachment is obsolete: true
Attachment #158084 - Flags: superreview?(roc)
Attachment #158084 - Flags: review?(daniel)
Attachment #158085 - Flags: superreview?(roc)
Attachment #158085 - Flags: review?(daniel)
Comment on attachment 158085 [details] [diff] [review]
patch v3

seems ok to me, although I don't know the nsEventStateManager context.
Please make sure this does not break Midas, Composer and form textareas.
Thanks.

r=daniel@glazman.org providing the tests I require above are done and ok.
Attachment #158085 - Flags: review?(daniel) → review+
Tested against Midas, Composer and form textareas, with Caret Browsing on/off.
All pass.
Status: NEW → ASSIGNED
Summary: Cursor doesn't appear in MailNews Compose Window, although you type something → Cursor (caret) doesn't appear in MailNews Compose Window, although you type something
Attachment #158085 - Flags: superreview?(roc) → superreview+
Attachment #158085 - Flags: approval1.8a4?
Comment on attachment 158085 [details] [diff] [review]
patch v3

a=asa for checkin to 1.8a4. Time is short so please get this landed ASAP.
Thanks.
Attachment #158085 - Flags: approval1.8a4? → approval1.8a4+
fixed.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Flags: blocking1.8a4?
Verified FIXED with Seamonkey trunk build 2004-10-01-05 on Windows XP.
Status: RESOLVED → VERIFIED
Blocks: 258536
*** Bug 258689 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: