summaryrefslogtreecommitdiffstats
path: root/layout/forms/nsListControlFrame.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-01-28 23:03:48 +0000
committerGitHub <noreply@github.com>2020-01-28 23:03:48 +0000
commited88b99849156004c04e4a0c87ea9b2360ef19b6 (patch)
tree85910991cfd39dc19da5e6ed5526d1a6e6c5ff0a /layout/forms/nsListControlFrame.cpp
parentc4b0715baaffc541670fd1158557aa7e61e521d3 (diff)
parent7a697172f36656126d6e415d91b4e260229ee37f (diff)
downloadUXP-ed88b99849156004c04e4a0c87ea9b2360ef19b6.tar
UXP-ed88b99849156004c04e4a0c87ea9b2360ef19b6.tar.gz
UXP-ed88b99849156004c04e4a0c87ea9b2360ef19b6.tar.lz
UXP-ed88b99849156004c04e4a0c87ea9b2360ef19b6.tar.xz
UXP-ed88b99849156004c04e4a0c87ea9b2360ef19b6.zip
Merge pull request #1357 from athenian200/form-disabled-issue
Forms: Click() isn't executing properly when elements are defined disabled
Diffstat (limited to 'layout/forms/nsListControlFrame.cpp')
-rw-r--r--layout/forms/nsListControlFrame.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp
index cc5f37f9a..58e81039f 100644
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -920,16 +920,11 @@ nsListControlFrame::HandleEvent(nsPresContext* aPresContext,
if (nsEventStatus_eConsumeNoDefault == *aEventStatus)
return NS_OK;
- // do we have style that affects how we are selected?
- // do we have user-input style?
- const nsStyleUserInterface* uiStyle = StyleUserInterface();
- if (uiStyle->mUserInput == StyleUserInput::None ||
- uiStyle->mUserInput == StyleUserInput::Disabled) {
+ // disabled state affects how we're selected, but we don't want to go through
+ // nsHTMLScrollFrame if we're disabled.
+ if (IsContentDisabled()) {
return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
}
- EventStates eventStates = mContent->AsElement()->State();
- if (eventStates.HasState(NS_EVENT_STATE_DISABLED))
- return NS_OK;
return nsHTMLScrollFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
}