Bug 394473 - "caret/cursor in View Source is invisible since 20070628 {not rendered, seen, can't, cannot, shown, displayed}" [p=cpearce r=peterv sr=roc a1.9=schrep]

git-svn-id: svn://10.0.0.236/trunk@239269 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
reed%reedloden.com 2007-11-13 05:42:52 +00:00
parent 725018d161
commit 75efb2acd2
2 changed files with 18 additions and 6 deletions

View File

@ -1130,11 +1130,14 @@ nsTextEditorFocusListener::Focus(nsIDOMEvent* aEvent)
getter_AddRefs(selection));
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShell);
if (presShell && selection) {
nsCOMPtr<nsICaret> caret;
presShell->GetCaret(getter_AddRefs(caret));
if (caret) {
caret->SetCaretDOMSelection(selection);
if (presShell) {
nsCOMPtr<nsICaret> caret;
presShell->GetCaret(getter_AddRefs(caret));
if (caret) {
caret->SetIgnoreUserModify(PR_FALSE);
if (selection) {
caret->SetCaretDOMSelection(selection);
}
}
}
@ -1199,6 +1202,15 @@ nsTextEditorFocusListener::Blur(nsIDOMEvent* aEvent)
selectionPrivate->SetAncestorLimiter(nsnull);
}
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShell);
if (presShell) {
nsCOMPtr<nsICaret> caret;
presShell->GetCaret(getter_AddRefs(caret));
if (caret) {
caret->SetIgnoreUserModify(PR_TRUE);
}
}
selCon->SetCaretEnabled(PR_FALSE);
PRUint32 flags;

View File

@ -91,7 +91,7 @@ nsCaret::nsCaret()
, mShowDuringSelection(PR_FALSE)
, mLastContentOffset(0)
, mLastHint(nsFrameSelection::HINTLEFT)
, mIgnoreUserModify(PR_FALSE)
, mIgnoreUserModify(PR_TRUE)
#ifdef IBMBIDI
, mLastBidiLevel(0)
, mKeyboardRTL(PR_FALSE)