Comment 17 for bug 1731272

Revision history for this message
a. bellenir (abellenir) wrote :

this stems from something goofy with timing and promises in angular. i didn't manage to track down a good fix, but someone more knowledgeable about the inner workings and angular may have better luck.

when the record doesn't have any holds, the instruction to close the progress dialog manages to run before the dialog is displayed.

i tried using chrome's debugger, putting breakpoints on egProgressDialog.open (near line 1678) and egProgresDialog.close (near line 1714) in catalog/app.js

with a breakpoint on both opening and closing the dialog, the dialog is open when it is closed.
with a breakpoint only on closing the dialog, the dialog is not yet open when it is closed.

the stupid fix (now pushed to the existing branch here: http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/abellenir/lp1731272-record-reload) is to wrap the call to egProgressDialog.close in a setTimeout, delaying its invocation by pushing it to the end of the event queue.