Skip navigation
Currently Being Moderated

How to force to NOT reload extension when it is closed/hidden?

Dec 16, 2013 4:26 AM

I am working on extension that has to be connected to remote server all the time after user logs in through simple form.

The problem is that when user minimizes/closes extension panel (and extension is minimalized to its icon) then whole extension (html5 panel) is unloaded. Then after user clicks extension icon again the extension panel is loaded again (with all javascript code).

I saw other plugins that dont reload on minimize - how I can do it?

In manifest.xml I have:

 

<Lifecycle>

    <AutoVisible>true</AutoVisible>

</Lifecycle>

 
Replies
  • Currently Being Moderated
    Dec 16, 2013 6:16 AM   in reply to Airnauts

    Hi,

     

    Are you using Flash extensions or HTML5?

     

    If Flash, have you looked into using Invisible panels?

     

    Best regards,

    Hallgrimur

    --

    Hallgrimur Th. Bjornsson | Product Manager | Adobe | Tel: +44 (0) 1314582787

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 16, 2013 6:22 AM   in reply to Airnauts

    Nope, not yet. But there may be other workarounds. What product are you building the extension for ?

     

    Best regards,

    Hallgrimur

    --

    Hallgrimur Th. Bjornsson | Product Manager | Adobe | Tel: +44 (0) 1314582787

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 16, 2013 6:56 PM   in reply to Airnauts

    Hi Airnauts,

     

    In Photoshop 14.1.2, I am afraid that an HTML panel will get unloaded whenever it is hidden or closed. There is no viable workaround at the moment.

     

    In the coming new Photoshop 14.2 release, you can keep your HTML panel running by code like this:

    function Persistent(inOn) {

        if (inOn) {

            var event = new CSEvent("com.adobe.PhotoshopPersistent", "APPLICATION");

        } else {

            var event = new CSEvent("com.adobe.PhotoshopUnPersistent", "APPLICATION");

        }

        event.extensionId = gExtensionId;

        csInterface.dispatchEvent(event);

    }

     

    Persistent(true);//persistent to prevent extension from unloading

    Persistent(false);//unpersistent

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points