Copy to Clipboard when fullscreen

  • For some reason copy_to_clipboard js action doesn't work when in fullscreen, is there a workaround ?

  • Interesting - it seems that content outside the current fullscreen element is not usable...

    Here an alternative implementation that creates the textarea inside krpano and so inside the fullscreen element, then it works:

    Code
    <action name="copy_to_clipboard" type="Javascript"><![CDATA[
        var textarea = document.createElement('textarea');
        textarea.value = args[1];
        krpano.display.viewerlayer.appendChild(textarea);
        textarea.select();
        document.execCommand('copy');
        krpano.display.viewerlayer.removeChild(textarea);
    ]]></action>

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!