diff options
author | Moonchild <moonchild@palemoon.org> | 2020-01-28 23:03:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-28 23:03:48 +0000 |
commit | ed88b99849156004c04e4a0c87ea9b2360ef19b6 (patch) | |
tree | 85910991cfd39dc19da5e6ed5526d1a6e6c5ff0a /layout/forms/nsListControlFrame.cpp | |
parent | c4b0715baaffc541670fd1158557aa7e61e521d3 (diff) | |
parent | 7a697172f36656126d6e415d91b4e260229ee37f (diff) | |
download | UXP-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.cpp | 11 |
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); } |