summaryrefslogtreecommitdiff
path: root/dom/html/HTMLSummaryElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/html/HTMLSummaryElement.cpp')
-rw-r--r--dom/html/HTMLSummaryElement.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/dom/html/HTMLSummaryElement.cpp b/dom/html/HTMLSummaryElement.cpp
index b9de03fd11..ee3c07b20b 100644
--- a/dom/html/HTMLSummaryElement.cpp
+++ b/dom/html/HTMLSummaryElement.cpp
@@ -116,8 +116,15 @@ HTMLSummaryElement::IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable,
return disallowOverridingFocusability;
}
- // The main summary element is focusable on all supported platforms.
+#ifdef XP_MACOSX
+ // The parent does not have strong opinion about the focusability of this main
+ // summary element, but we'd like to override it when mouse clicking on Mac OS
+ // like other form elements.
+ *aIsFocusable = !aWithMouse || nsFocusManager::sMouseFocusesFormControl;
+#else
+ // The main summary element is focusable on other platforms.
*aIsFocusable = true;
+#endif
// Give a chance to allow the subclass to override aIsFocusable.
return false;