add comment about an open bug with native Android browser (4.1.2) when the page is scrolled

This commit is contained in:
tsauerwein
2014-02-12 16:25:24 +01:00
parent e1f4410ad4
commit 7c8713f79d

View File

@@ -107,7 +107,24 @@ ol.pointer.MouseSource.prototype.unlistenOnDocument = function(type) {
/**
* Collide with the global mouse listener
* Detect if a mouse event was simulated from a touch by
* checking if previously there was a touch event at the
* same position.
*
* FIXME - Known problem with the native Android browser on
* Samsung GT-I9100 (Android 4.1.2):
* In case the page is scrolled, this function does not work
* correctly when a canvas is used (WebGL or canvas renderer).
* Mouse listeners on canvas elements (for this browser), create
* two mouse events: One 'good' and one 'bad' one (on other browsers or
* when a div is used, there is only one event). For the 'bad' one,
* clientX/clientY and also pageX/pageY are wrong when the page
* is scrolled. Because of that, this function can not detect if
* the events were simulated from a touch event. As result, a
* pointer event at a wrong position is dispatched, which confuses
* the map interactions.
* It is unclear, how one can get the correct position for the event
* or detect that the positions are invalid.
*
* @private
* @param {goog.events.BrowserEvent} inEvent