Monday, September 20, 2010

If you're getting errors on dijit.Dialog.hide() on Domino 8.5.2 - workaround

Update: I found the reason. Opening a dialog from another dialog (which is then destroyed). Unless refocus=false, dojo (1.4.3) tries to put back the focus to the "destroyed" dialog.

There is a bug in the current code stream (dojo 1.4.2) when hiding/closing dialogs. I'm not a 100% sure what triggers the bug in our applications. It happens on a couple of dialogs.

The workaround for the bug is to add refocus: false in the options when creating the dialog. E.g.
var dialog = new dijit.Dialog({
refocus: false,
title: 'Dialog title'
});

0 comments: