Uncaught TypeError: Cannot read property 'scrollTop' of null

xiaix
Tera Guru

So, in Eureka, this code works fine:

function close_and_reopen_UI_Page()

{

      // Close this current pop-up UI page

      GlideDialogWindow.get().destroy();

     

      // Re-open this UI pop-up page again, but now showing updated info

      var dialog = new GlideDialogWindow('bcp_BCC_Author_EDIT');

      dialog.render();

}

However, in Geneva, when it hits line 8, dialog.render(), my web browser stays in a permanent .5 opacity mode and looking in console log, I see:

find_real_file.png

Which upon inspection shows:

find_real_file.png

1 REPLY 1

xiaix
Tera Guru

Well, I found out how to fix the issue, but I can't figure out why it has to be done this way:



var UI_reload_Timer = 0;



function reopenUI()


{


      clearInterval(UI_reload_Timer);


     


      var dialog = new GlideDialogWindow('bcp_BCC_Author_EDIT');


      dialog.render();


}



function close_and_reopen_UI_Page()


{


      UI_reload_Timer = setInterval(function(){ reopenUI(); }, 500);


     


      // Close this current pop-up UI page


      GlideDialogWindow.get().destroy();


     


      // Re-open this UI pop-up page again, but now showing updated info


      var dialog = new GlideDialogWindow('bcp_BCC_Author_EDIT');


      dialog.render();


}



Why do I need to set a delay to re-open the dialog window?