Cause the caret to become visible in the presentation shell when instantiating an editor.
git-svn-id: svn://10.0.0.236/trunk@20658 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
17e456ea85
commit
971ead2abc
@ -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<nsICaret> 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;
|
||||
|
||||
@ -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<nsICaret> 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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user