mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-01 11:27:55 +00:00
Bug 120527 Dialog fix to make default button not appear default while another button has focus r=aaronlev,mano,mconnor sr=jag
This commit is contained in:
parent
48cad43b58
commit
6dab407a52
@ -401,6 +401,12 @@
|
||||
</handler>
|
||||
#ifdef XP_MACOSX
|
||||
<handler event="keypress" key="." modifiers="meta" phase="capturing" action="this.cancelDialog();"/>
|
||||
#else
|
||||
<handler event="focus" phase="capturing">
|
||||
var btn = this.getButton(this.defaultButton);
|
||||
if (btn)
|
||||
btn.setAttribute("default", event.originalTarget == btn || !(event.originalTarget instanceof Components.interfaces.nsIDOMXULButtonElement));
|
||||
</handler>
|
||||
#endif
|
||||
</handlers>
|
||||
|
||||
|
@ -343,6 +343,11 @@
|
||||
if (!event.getPreventDefault())
|
||||
this.cancelDialog();
|
||||
</handler>
|
||||
<handler event="focus" phase="capturing">
|
||||
var btn = this.getButton(this.defaultButton);
|
||||
if (btn && !/Mac/.test(navigator.platform))
|
||||
btn.setAttribute("default", event.originalTarget == btn || !(event.originalTarget instanceof Components.interfaces.nsIDOMXULButtonElement));
|
||||
</handler>
|
||||
</handlers>
|
||||
|
||||
</binding>
|
||||
|
Loading…
x
Reference in New Issue
Block a user