diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index 61080a0c64e..1e5b4971a11 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -4866,6 +4866,15 @@ nsEventStateManager::ResetBrowseWithCaret() if (itemType == nsIDocShellTreeItem::typeChrome) return; // Never browse with caret in chrome + nsCOMPtr editorDocShell(do_QueryInterface(shellItem)); + if (editorDocShell) { + PRBool isEditable; + editorDocShell->GetEditable(&isEditable); + if (isEditable) { + return; // Reset caret visibility only if browsing, not editing + } + } + PRPackedBool browseWithCaret = nsContentUtils::GetBoolPref("accessibility.browsewithcaret");