How to priorities to display nested wj-popup one by one in Angular 2?

Posted by: ramu on 21 February 2019, 9:05 am EST

    • Post Options:
    • Link

    Posted 21 February 2019, 9:05 am EST

    Hi,

    We have used Wijmo 5.20171.282 version.

    Currently I have implemented one wj-popup displayed while initializing login component another one wj-popup window was triggered from Main Component for Session timeout using subscribe.

    Both occurred same time (i.e.) My session was timeout then 2nd popup triggered at the same time my application redirect to login component due to session timeout.

    Now both popup displayed but initializing login component popup displayed at front and session timeout popup displayed at back.

    I want to display session timeout popup at front. How to accomplish this feature?

    Thanks,

    Ramu

  • Posted 22 February 2019, 8:52 am EST

    Hi Ramu,

    We are currently working on this and will reply on this soon.

    Sorry for the inconvenience caused.

    Sharad

  • Posted 24 February 2019, 7:12 am EST

    Hi Ramu,

    As the default behavior, popups are shown in order i.e popup which is triggered at the last is shown on the top. If you would like to change this behavior then you may handle the shown event and update the z-index of the host element accordingly.

    Please refer to the following code snippet and sample:

    showWithPriority(popup, priorityValue){
        let pModifier = (s, e) => {
          s.hostElement.style.zIndex = Number(s.hostElement.style.zIndex) + priorityValue;
          s.shown.removeHandler(pModifier);
        };
    
        popup.shown.addHandler(pModifier);
        popup.show(true);
      }
    

    https://stackblitz.com/edit/angular-r8lb9f?file=src%2Fapp%2Fapp.component.ts

  • Posted 25 February 2019, 10:43 am EST

    Thanks Sharad.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels