Bug 427412: prevent default beeping action for Cmd+Enter on Mac in autocomplete widgets, r=enndeakin, a=damon

This commit is contained in:
gavin@gavinsharp.com 2008-04-22 12:47:44 -07:00
parent 2688927694
commit 9b6dfd3011

View File

@ -460,6 +460,11 @@
cancel = this.mController.handleEscape();
break;
case KeyEvent.DOM_VK_RETURN:
#ifdef XP_MACOSX
// Prevent the default action, since it will beep on Mac
if (aEvent.metaKey)
aEvent.preventDefault();
#endif
this.mEnterEvent = aEvent;
cancel = this.mController.handleEnter(false);
break;