diff --git a/layout/xul/base/src/nsButtonBoxFrame.cpp b/layout/xul/base/src/nsButtonBoxFrame.cpp index 27a148557e2d..d4554db2b05f 100644 --- a/layout/xul/base/src/nsButtonBoxFrame.cpp +++ b/layout/xul/base/src/nsButtonBoxFrame.cpp @@ -112,6 +112,8 @@ nsButtonBoxFrame::HandleEvent(nsPresContext* aPresContext, } break; +// On mac, Return fires the defualt button, not the focused one. +#ifndef XP_MACOSX case NS_KEY_PRESS: if (NS_KEY_EVENT == aEvent->eventStructType) { nsKeyEvent* keyEvent = (nsKeyEvent*)aEvent; @@ -119,10 +121,12 @@ nsButtonBoxFrame::HandleEvent(nsPresContext* aPresContext, nsCOMPtr buttonEl(do_QueryInterface(mContent)); if (buttonEl) { MouseClicked(aPresContext, aEvent); + *aEventStatus = nsEventStatus_eConsumeNoDefault; } } } break; +#endif case NS_KEY_UP: if (NS_KEY_EVENT == aEvent->eventStructType) { diff --git a/toolkit/content/widgets/button.xml b/toolkit/content/widgets/button.xml index 681dd07e202a..05128bc53f99 100644 --- a/toolkit/content/widgets/button.xml +++ b/toolkit/content/widgets/button.xml @@ -170,9 +170,6 @@ this.fireAccessKeyButton(buttonBox, charPressedLower); ]]> - - - diff --git a/toolkit/content/widgets/dialog.xml b/toolkit/content/widgets/dialog.xml index 07dac14a55fd..c557628debfd 100644 --- a/toolkit/content/widgets/dialog.xml +++ b/toolkit/content/widgets/dialog.xml @@ -47,13 +47,6 @@ if (!document.documentElement.cancelDialog()) event.preventDefault(); }) - -#ifdef XP_MACOSX - true -#else - false -#endif - - - - diff --git a/xpfe/global/resources/content/bindings/dialog.xml b/xpfe/global/resources/content/bindings/dialog.xml index 29c999d29e2d..31752390dfc8 100644 --- a/xpfe/global/resources/content/bindings/dialog.xml +++ b/xpfe/global/resources/content/bindings/dialog.xml @@ -35,7 +35,6 @@ if (!document.documentElement.cancelDialog()) event.preventDefault(); }) - false - - true - -