Teaching titled buttons how to execute the oncommand handler when clicked (or when

space/enter is hit on them).
This commit is contained in:
hyatt%netscape.com 1999-08-21 07:56:49 +00:00
Родитель 0fb6e99473
Коммит 570b368374
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -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)