Bug 1105184 - Setup the mCaret used for DND so that it displays the caret also when dragging a selection within the same shell. r=roc

This commit is contained in:
Mats Palmgren 2014-12-01 15:55:16 +00:00
parent fa685d9436
commit 8e2e146845

View File

@ -813,6 +813,10 @@ nsEditorEventListener::DragEnter(nsIDOMDragEvent* aDragEvent)
mCaret = new nsCaret();
mCaret->Init(presShell);
mCaret->SetCaretReadOnly(true);
// This is to avoid the requirement that the Selection is Collapsed which
// it can't be when dragging a selection in the same shell.
// See nsCaret::IsVisible().
mCaret->SetVisibilityDuringSelection(true);
}
presShell->SetCaret(mCaret);