diff --git a/mozilla/editor/base/nsEditor.cpp b/mozilla/editor/base/nsEditor.cpp index 21d03e52aca..bdea31bd9ca 100644 --- a/mozilla/editor/base/nsEditor.cpp +++ b/mozilla/editor/base/nsEditor.cpp @@ -39,6 +39,7 @@ #include "nsIEnumerator.h" #include "nsIAtom.h" #include "nsVoidArray.h" +#include "nsICaret.h" #include "nsIContent.h" // for temp method GetColIndexForCell, to be removed #include "nsITableCellLayout.h" // for temp method GetColIndexForCell, to be removed @@ -249,6 +250,14 @@ nsEditor::Init(nsIDOMDocument *aDoc, nsIPresShell* aPresShell) mPresShell->GetViewManager(&mViewManager); mUpdateCount=0; + /* Show the caret */ + nsCOMPtr caret; + if (NS_SUCCEEDED(mPresShell->GetCaret(getter_AddRefs(caret)))) + { + caret->SetCaretVisible(PR_TRUE); + caret->SetCaretReadOnly(PR_FALSE); + } + NS_POSTCONDITION(mDoc && mPresShell, "bad state"); return NS_OK; diff --git a/mozilla/editor/libeditor/base/nsEditor.cpp b/mozilla/editor/libeditor/base/nsEditor.cpp index 21d03e52aca..bdea31bd9ca 100644 --- a/mozilla/editor/libeditor/base/nsEditor.cpp +++ b/mozilla/editor/libeditor/base/nsEditor.cpp @@ -39,6 +39,7 @@ #include "nsIEnumerator.h" #include "nsIAtom.h" #include "nsVoidArray.h" +#include "nsICaret.h" #include "nsIContent.h" // for temp method GetColIndexForCell, to be removed #include "nsITableCellLayout.h" // for temp method GetColIndexForCell, to be removed @@ -249,6 +250,14 @@ nsEditor::Init(nsIDOMDocument *aDoc, nsIPresShell* aPresShell) mPresShell->GetViewManager(&mViewManager); mUpdateCount=0; + /* Show the caret */ + nsCOMPtr caret; + if (NS_SUCCEEDED(mPresShell->GetCaret(getter_AddRefs(caret)))) + { + caret->SetCaretVisible(PR_TRUE); + caret->SetCaretReadOnly(PR_FALSE); + } + NS_POSTCONDITION(mDoc && mPresShell, "bad state"); return NS_OK;