зеркало из https://github.com/mozilla/pjs.git
Added check to see if it was disabled so it would ignore events
This commit is contained in:
Родитель
e50aa72a0f
Коммит
8c636d19e8
|
@ -22,6 +22,7 @@
|
||||||
#include "nsWidgetsCID.h"
|
#include "nsWidgetsCID.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
#include "nsHTMLAtoms.h"
|
#include "nsHTMLAtoms.h"
|
||||||
|
#include "nsFormFrame.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -115,6 +116,9 @@ NS_METHOD nsCheckboxControlFrame::HandleEvent(nsIPresContext& aPresContext,
|
||||||
if (nsEventStatus_eConsumeNoDefault == aEventStatus) {
|
if (nsEventStatus_eConsumeNoDefault == aEventStatus) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
if (nsFormFrame::GetDisabled(this)) {
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
switch(aEvent->message) {
|
switch(aEvent->message) {
|
||||||
case NS_KEY_PRESS:
|
case NS_KEY_PRESS:
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "nsHTMLAtoms.h"
|
#include "nsHTMLAtoms.h"
|
||||||
#include "nsFormFrame.h"
|
#include "nsFormFrame.h"
|
||||||
#include "nsINameSpaceManager.h"
|
#include "nsINameSpaceManager.h"
|
||||||
|
#include "nsFormFrame.h"
|
||||||
|
|
||||||
|
|
||||||
static NS_DEFINE_IID(kIRadioControlFrameIID, NS_IRADIOCONTROLFRAME_IID);
|
static NS_DEFINE_IID(kIRadioControlFrameIID, NS_IRADIOCONTROLFRAME_IID);
|
||||||
|
@ -181,6 +182,10 @@ nsRadioControlFrame::HandleEvent(nsIPresContext& aPresContext,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nsFormFrame::GetDisabled(this)) {
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
switch(aEvent->message) {
|
switch(aEvent->message) {
|
||||||
case NS_KEY_PRESS:
|
case NS_KEY_PRESS:
|
||||||
if (NS_KEY_EVENT == aEvent->eventStructType) {
|
if (NS_KEY_EVENT == aEvent->eventStructType) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче