mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
parent
db72493615
commit
693a79ca08
14 changed files with 88 additions and 72 deletions
|
|
@ -813,10 +813,11 @@ nsFocusManager::ContentRemoved(nsIDocument* aDocument, nsIContent* aContent)
|
|||
if (!window)
|
||||
return NS_OK;
|
||||
|
||||
// if the content is currently focused in the window, or is an ancestor
|
||||
// of the currently focused element, reset the focus within that window.
|
||||
// if the content is currently focused in the window, or is an
|
||||
// shadow-including inclusive ancestor of the currently focused element,
|
||||
// reset the focus within that window.
|
||||
nsIContent* content = window->GetFocusedNode();
|
||||
if (content && nsContentUtils::ContentIsDescendantOf(content, aContent)) {
|
||||
if (content && nsContentUtils::ContentIsHostIncludingDescendantOf(content, aContent)) {
|
||||
bool shouldShowFocusRing = window->ShouldShowFocusRing();
|
||||
window->SetFocusedNode(nullptr);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue