mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
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.
This commit is contained in:
parent
675d15f7f8
commit
f6b3f2c38b
14 changed files with 35 additions and 26 deletions
|
|
@ -2285,10 +2285,17 @@ nsGenericHTMLFormElement::FormIdUpdated(Element* aOldElement,
|
|||
}
|
||||
|
||||
bool
|
||||
nsGenericHTMLFormElement::IsElementDisabledForEvents(EventMessage aMessage,
|
||||
nsGenericHTMLFormElement::IsElementDisabledForEvents(WidgetEvent* aEvent,
|
||||
nsIFrame* aFrame)
|
||||
{
|
||||
switch (aMessage) {
|
||||
MOZ_ASSERT(aEvent);
|
||||
|
||||
// Allow dispatch of CustomEvent and untrusted Events.
|
||||
if (!aEvent->IsTrusted()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (aEvent->mMessage) {
|
||||
case eMouseMove:
|
||||
case eMouseOver:
|
||||
case eMouseOut:
|
||||
|
|
@ -2454,8 +2461,9 @@ nsGenericHTMLFormElement::IsLabelable() const
|
|||
void
|
||||
nsGenericHTMLElement::Click()
|
||||
{
|
||||
if (HandlingClick())
|
||||
if (IsDisabled() || HandlingClick()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Strong in case the event kills it
|
||||
nsCOMPtr<nsIDocument> doc = GetComposedDoc();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue