In that case I better set the handler to do nothing then 

Patrick Huang 
Senior Software Engineer 
Engineering - Internationalisation 
Red Hat 

----- Original Message -----

> From: "Alex Eng" <notifications@github.com>
> To: "zanata/zanata-server" <zanata-server@noreply.github.com>
> Cc: "Patrick Huang" <pahuang@redhat.com>
> Sent: Wednesday, September 18, 2013 10:01:23 AM
> Subject: Re: [zanata-server] rhbz1008253 - intercept ESC so that firefox
> won't close connection (#182)

> In
> zanata-war/src/main/java/org/zanata/webtrans/client/ui/ShortcutContextAwareDialogBox.java:
> > @@ -17,6 +22,22 @@ public ShortcutContextAwareDialogBox(boolean autoHide,
> > boolean modal, ShortcutCo
> >        super(autoHide, modal);
> >        this.modalContext = modalContext;
> >        this.keyShortcutPresenter = keyShortcutPresenter;
> > +      // intercept esc key so that Firefox won't close event service
> > connection
> > +      KeyShortcut hideSelfShortcut = KeyShortcut.Builder.builder()
> > +            .addKey(new Keys(Keys.NO_MODIFIER, KeyCodes.KEY_ESCAPE))
> > +            .setContext(modalContext)
> > +            .setKeyEvent(KeyShortcut.KeyEvent.KEY_DOWN)
> > +            .setPreventDefault(true)
> > +            .setStopPropagation(true)
> > +            .setHandler(new KeyShortcutEventHandler()
> > +            {
> > +               @Override
> > +               public void onKeyShortcut(KeyShortcutEvent event)
> > +               {
> > +                  hide();

> Are we hiding the dialog box with escape key? This doesn't apply to all
> scenario, especially those which only allow user to pick options from the
> dialogbox.

> —
> Reply to this email directly or view it on GitHub .