From dea4254a317eab6e3b0331eb39775e9b2ba66e64 Mon Sep 17 00:00:00 2001 From: "mozilla.mano%sent.com" Date: Sat, 18 Jun 2005 10:21:49 +0000 Subject: [PATCH] Bug 284776 - Need support in dialog.xml for setting a default button. r=mconnor a=asa. --- toolkit/content/widgets/dialog.xml | 53 ++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/toolkit/content/widgets/dialog.xml b/toolkit/content/widgets/dialog.xml index c78f9b8e4c8..07dac14a55f 100644 --- a/toolkit/content/widgets/dialog.xml +++ b/toolkit/content/widgets/dialog.xml @@ -59,6 +59,23 @@ onget="return this.getAttribute('buttons');" onset="this._configureButtons(val); return val;"/> + + + + + + + + + - + + + + + + + + @@ -364,10 +404,9 @@ if (!this.enterDefaultAlways && evt.getPreventDefault()) return; - // only accept dialog if accept button is the default - var btn = this.getButton("accept"); - if (btn && btn.hasAttribute("default")) - this.acceptDialog(); + var btn = this.getButton(this.defaultButton); + if (btn) + this._doButtonCommand(this.defaultButton); ]]>