update default behaviour of popups. now you can click and drag inside a popup without the events dropping through to the map, yet if you are dragging a zoombox over a popup, it still responds. this is all thanks to a new function i am adding to Util.js which is called OpenLayers.Util.safeStopPropagaition(). Turns out the default Event.stop() from prototype.js is also calling a function called preventDefault() which disallows things like selecting text or clicking a hyperlink. all tests pass.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1438 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-09-13 08:20:02 +00:00
parent 6793507a34
commit 7ce7f2484b
4 changed files with 114 additions and 8 deletions
+13
View File
@@ -516,3 +516,16 @@ OpenLayers.Util.getResolutionFromScale = function (scale, units) {
* OpenLayers.DOTS_PER_INCH);
return resolution;
};
/** Safely stop the propagation of an event *without* preventing
* the default browser action from occurring.
*
* @param {Event} evt
*/
OpenLayers.Util.safeStopPropagation = function(evt) {
if (evt.stopPropagation) {
evt.stopPropagation();
}
evt.returnValue = false;
evt.cancelBubble = true;
};