Hide/show events for Popup in JS 4.0 Beta 2?

3642
1
Jump to solution
12-04-2015 12:40 PM
by Anonymous User
Not applicable

In the ArcGIS API 4.0 Beta 2 for JavaScript, how can I listen for the MapView's popup to open or close? Specifically, I need to run code when the user closes the popup. I tried this:

view.popup.on("hide", myFunction);

I tried this:

view.popup.on("blur", myFunction);

But neither of those events seems to exist for a Popup. How do I do it, or is it not possible?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Gary,

  You need to watch the visible property.

view.popup.watch("visible", function(name, oldValue, newValue){
        console.info(name, oldValue, newValue);
      })

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Emeritus

Gary,

  You need to watch the visible property.

view.popup.watch("visible", function(name, oldValue, newValue){
        console.info(name, oldValue, newValue);
      })