From 0a19762d3bb5f6bcaa00a8f168e469d9fdda76b9 Mon Sep 17 00:00:00 2001 From: athenian200 Date: Thu, 21 May 2020 01:31:48 -0500 Subject: Issue #1557 - Allow event dispatch on disabled form controls. Based on https://bugzilla.mozilla.org/show_bug.cgi?id=329509 This seems to resolve #1356 without causing #1557. Also reverts previous changes as they no longer appear to serve a purpose. --- dom/base/nsDOMWindowUtils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dom/base') diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index a923e8f70..5e9235f11 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -3577,7 +3577,8 @@ nsDOMWindowUtils::IsNodeDisabledForEvents(nsIDOMNode* aNode, bool* aRetVal) while (node) { if (node->IsNodeOfType(nsINode::eHTML_FORM_CONTROL)) { nsCOMPtr fc = do_QueryInterface(node); - if (fc && fc->IsDisabledForEvents(eVoidEvent)) { + WidgetEvent event(true, eVoidEvent); + if (fc && fc->IsDisabledForEvents(&event)) { *aRetVal = true; break; } -- cgit v1.2.3