Support » Plugin: Modal Dialog » Adding Sandbox attribute (how?)

  • Resolved homerecords

    (@homerecords)


    Hello Yannick,

    I was wondering if and how I could add a sandbox attribute to your script.

    I ask this because I would like to add a external webpage with script to the dialog.
    This initialy works fine but due to the external script it causes problem with the navigation menu (browsing the navigation menu) and with the back and forward button of several browsers like Chrome and Edge..

    Now I know that when I use that website script inside an iframe I can resolve the issue by adding the Sandbox attribute with certain values.

    But how do I add that attribute ( or something similar) to your plugin configuration?

    If you would like to know more or an example I will set it up on a test website.

    Thanks in advance and kind regards,

    Ed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Yannick Lefebvre

    (@jackdewey)

    Hi there, I’ve checked and none of the two pop-up dialog libraries that Modal Dialog supports offers an option to set the sandbox attribute on the iframe that they create. Doing a quick online search, I did not find any potential candidates to add to Modal Dialog that would offer such functionality.

    Thread Starter homerecords

    (@homerecords)

    Thanks for your reply Yannick!

    I have been looking into the code (in colorbox & fancybox too) as well and tried a few things but didn’t work, as you mentioned.

    But for now a solved my issue by adding the sandbox attribute into some html code and that I put in the text area (Dialog Contents) instead of adding the URL to the website address field.

    Like this

     html formatted text text
    <iframe src="https://website.ext" sandbox="allow-scripts allow-forms allow-same-origin" width="800" height="600" frameborder="3"> </iframe>
    some more html formatted text 

    Works fine now but it’s just that it’s an iframe inside an iframe now.

    But it works.

    Thanks again and have a nice day.

    Ed.

    • This reply was modified 7 months, 2 weeks ago by homerecords.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding Sandbox attribute (how?)’ is closed to new replies.