63728 - Per-platform behavior of Enter key when a button is focused in a dialog, r=ben, sr=blake
git-svn-id: svn://10.0.0.236/trunk@107233 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -202,10 +202,10 @@
|
||||
<method name="_hitEnter">
|
||||
<body>
|
||||
<![CDATA[
|
||||
// if a dialog button is focused, do nothing, since its oncommand
|
||||
// will fire, causing the _doButtonCommand to be called naturally
|
||||
// if a button is focused, do nothing, so that activating the button
|
||||
// doesn't cause the dialog to exit
|
||||
var focused = document.commandDispatcher.focusedElement;
|
||||
if (focused && focused.localName == "button" && focused.hasAttribute("dlgtype"))
|
||||
if (focused && focused.localName == "button")
|
||||
return;
|
||||
|
||||
// only accept dialog if accept button is the default
|
||||
|
||||
Reference in New Issue
Block a user