Turn on selection for all documents that are being edited. This enables selection in GFX ender widgets.

This commit is contained in:
sfraser%netscape.com 1999-07-23 00:11:00 +00:00
parent 7926eb10f0
commit 5f74f88c68
2 changed files with 10 additions and 0 deletions

View File

@ -494,6 +494,11 @@ nsEditor::Init(nsIDOMDocument *aDoc, nsIPresShell* aPresShell)
mDoc = aDoc;
mPresShell = aPresShell; // we don't addref the pres shell
// ensure that text is selectable (for text widgets etc)
nsCOMPtr<nsIDocument> theDoc = do_QueryInterface(mDoc);
if (theDoc)
theDoc->SetDisplaySelection(PR_TRUE);
// disable links
nsCOMPtr<nsIPresContext> context;
mPresShell->GetPresContext(getter_AddRefs(context));

View File

@ -494,6 +494,11 @@ nsEditor::Init(nsIDOMDocument *aDoc, nsIPresShell* aPresShell)
mDoc = aDoc;
mPresShell = aPresShell; // we don't addref the pres shell
// ensure that text is selectable (for text widgets etc)
nsCOMPtr<nsIDocument> theDoc = do_QueryInterface(mDoc);
if (theDoc)
theDoc->SetDisplaySelection(PR_TRUE);
// disable links
nsCOMPtr<nsIPresContext> context;
mPresShell->GetPresContext(getter_AddRefs(context));