зеркало из https://github.com/mozilla/pjs.git
Teaching titled buttons how to execute the oncommand handler when clicked (or when
space/enter is hit on them).
This commit is contained in:
Родитель
6fdb4496ff
Коммит
01142c3baf
|
@ -1105,6 +1105,13 @@ nsTitledButtonFrame::SetCurrentCheckState(CheckState aState)
|
|||
void
|
||||
nsTitledButtonFrame::MouseClicked (nsIPresContext & aPresContext)
|
||||
{
|
||||
// Execute the oncommand event handler.
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsMouseEvent event;
|
||||
event.eventStructType = NS_EVENT;
|
||||
event.message = NS_MENU_ACTION;
|
||||
mContent->HandleDOMEvent(aPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, status);
|
||||
|
||||
// if we are not toggling then do nothing
|
||||
CheckState oldState = GetCurrentCheckState();
|
||||
if (oldState == eUnset)
|
||||
|
|
Загрузка…
Ссылка в новой задаче