Skip to content

Commit

Permalink
Prevent error storm when NativeWindow.get().focus() fails during Moda…
Browse files Browse the repository at this point in the history
…lDialogBase load

We just ran into a situation where for some reason a DOMWindow didn't have a focus method, causing ModalDialogBase::onLoad's allActiveDialogs_.add(this) not to be called. That results in ModalDialogBase::onPreviewNativeEvent throwing an error on every browser event (such as moving the mouse!), which filled up our error logs.
  • Loading branch information
jcheng5 committed Sep 2, 2011
1 parent 6eb4656 commit f435e1b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ protected void beginDragging(MouseDownEvent event)
@Override
protected void onLoad()
{
// 728: Focus remains in Source view when message dialog pops up over it
NativeWindow.get().focus();

super.onLoad();
allActiveDialogs_.add(this);
if (shortcutDisableHandle_ != null)
shortcutDisableHandle_.close();
shortcutDisableHandle_ = ShortcutManager.INSTANCE.disable();

// 728: Focus remains in Source view when message dialog pops up over it
NativeWindow.get().focus();
}

@Override
Expand Down

0 comments on commit f435e1b

Please sign in to comment.