diff --git a/mozilla/layout/xul/base/src/nsButtonBoxFrame.cpp b/mozilla/layout/xul/base/src/nsButtonBoxFrame.cpp index 23f43d73216..27a148557e2 100644 --- a/mozilla/layout/xul/base/src/nsButtonBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsButtonBoxFrame.cpp @@ -48,7 +48,6 @@ #include "nsPresContext.h" #include "nsIPresShell.h" #include "nsGUIEvent.h" -#include "nsIDOMEvent.h" #include "nsIEventStateManager.h" #include "nsXULAtoms.h" #include "nsIDOMElement.h" @@ -113,8 +112,6 @@ 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; @@ -122,12 +119,10 @@ nsButtonBoxFrame::HandleEvent(nsPresContext* aPresContext, nsCOMPtr buttonEl(do_QueryInterface(mContent)); if (buttonEl) { MouseClicked(aPresContext, aEvent); - aEvent->PreventDefault(); } } } break; -#endif case NS_KEY_UP: if (NS_KEY_EVENT == aEvent->eventStructType) { diff --git a/mozilla/toolkit/content/widgets/button.xml b/mozilla/toolkit/content/widgets/button.xml index 05128bc53f9..681dd07e202 100644 --- a/mozilla/toolkit/content/widgets/button.xml +++ b/mozilla/toolkit/content/widgets/button.xml @@ -170,6 +170,9 @@ this.fireAccessKeyButton(buttonBox, charPressedLower); ]]> + + + diff --git a/mozilla/toolkit/content/widgets/dialog.xml b/mozilla/toolkit/content/widgets/dialog.xml index c557628debf..07dac14a55f 100644 --- a/mozilla/toolkit/content/widgets/dialog.xml +++ b/mozilla/toolkit/content/widgets/dialog.xml @@ -47,6 +47,13 @@ if (!document.documentElement.cancelDialog()) event.preventDefault(); }) + +#ifdef XP_MACOSX + true +#else + false +#endif + + + + diff --git a/mozilla/xpfe/global/resources/content/bindings/dialog.xml b/mozilla/xpfe/global/resources/content/bindings/dialog.xml index 31752390dfc..29c999d29e2 100644 --- a/mozilla/xpfe/global/resources/content/bindings/dialog.xml +++ b/mozilla/xpfe/global/resources/content/bindings/dialog.xml @@ -35,6 +35,7 @@ if (!document.documentElement.cancelDialog()) event.preventDefault(); }) + false + + true + +