Closing a popup does not work if the underlying feature is removed while popup was open. This can easily happen when using e.g. a BBOX Strategy:
1. user clicks on a feature to open a popup
2. if popup is visually large, panMapIfOutOfView kicks in and pans the map to keep popup in view
3. OL BBOX Strategy kicks in, fetches new features and removes old ones from layer (this sets Drupal.openlayers.popup.selectedFeature.layer=null)
4. user clicks on popup closebox [X]
5. DOL Popup behavior close function fails because Drupal.openlayers.popup.selectedFeature.layer==null
Attached is a patch of openlayers_behavior_popup.js against 6.x-2.x CVS.
Comment | File | Size | Author |
---|---|---|---|
OpenLayers-popup-featureremoved.patch | 1.44 KB | ahtih | |
Comments
Comment #1
tmcw CreditAttribution: tmcw commentedGreat, committed: http://drupal.org/cvs?commit=492414