Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  15 Aug 2022, Zaher Salman, Bug Report, firefox hangs due to mhistory 
    Reply  15 Aug 2022, Stefan Ritt, Bug Report, firefox hangs due to mhistory 
       Reply  16 Aug 2022, Zaher Salman, Bug Report, firefox hangs due to mhistory 
          Reply  16 Aug 2022, Zaher Salman, Bug Report, firefox hangs due to mhistory 
             Reply  17 Aug 2022, Stefan Ritt, Bug Report, firefox hangs due to mhistory 
                Reply  17 Aug 2022, Zaher Salman, Bug Report, firefox hangs due to mhistory 
                   Reply  17 Aug 2022, Stefan Ritt, Bug Report, firefox hangs due to mhistory 
          Reply  16 Aug 2022, Konstantin Olchanski, Bug Report, firefox hangs due to mhistory 
Message ID: 2430     Entry time: 17 Aug 2022     In reply to: 2429     Reply to this: 2431   2432
Author: Zaher Salman 
Topic: Bug Report 
Subject: firefox hangs due to mhistory 
> The problem lies in your function mhistory_init_one() in Mudas.js:1965. You can only call "new MhistoryGraph(e)" with an element "e" which is something like
> 
> <div class="mjshistory" data-group="..." data-panel="..." data-base-u-r-l="https://host.psi.ch/?cmd=history" title="">
> 
> Please note the "data-base-u-r-l". This gets automatically added by the function mhistory_init() in mhistory.js:48. The URL is necessary sot that the upper right button in a history graph works which goes to a history page only showing the current graph.
> 
> In you function mhistory_init_one() you forgot the call
> 
>    mhist.dataset.baseURL = baseURL; 
> 
> where baseURL has to come from the current address bar like
> 
>    let baseURL = window.location.href;
>    if (baseURL.indexOf("?cmd") > 0)
>       baseURL = baseURL.substr(0, baseURL.indexOf("?cmd"));
>    baseURL += "?cmd=history";
> 
> If you duplicate some functionality from mhistory.js, please make sure to duplicate it completely.
> 

Thanks Stefan, but this was not the problem since I am setting the baseURL. You may have looked at the code during my debugging.

Some of my histories are placed in an IFrame object. I eventually realized that my code fails when it tries to resize a history which is placed in an invisible IFrame. I resolved the issue by making sure that I am resizing plots only if they are in a visible IFrame.
  
ELOG V3.1.4-2e1708b5