loleaflet: not forward mouse events to core when user tap on a comment
For instance on Writer that causes the text cursor to be moved to a new position. Change-Id: I92082b7d0a3b512e0ceaabcea8592d09d0da27be
This commit is contained in:
parent
62e1d9ad82
commit
144089e639
1 changed files with 7 additions and 0 deletions
|
@ -301,6 +301,13 @@ L.Map.TouchGesture = L.Handler.extend({
|
|||
// unselect if anything is selected already
|
||||
if (this._map._docLayer && this._map._docLayer._annotations && this._map._docLayer._annotations.unselect) {
|
||||
this._map._docLayer._annotations.unselect();
|
||||
var pointPx = this._map._docLayer._twipsToPixels(mousePos);
|
||||
var bounds = this._map._docLayer._annotations.getBounds();
|
||||
if (bounds && bounds.contains(pointPx)) {
|
||||
// not forward mouse events to core if the user tap on a comment box
|
||||
// for instance on Writer that causes the text cursor to be moved
|
||||
return;
|
||||
}
|
||||
}
|
||||
this._map._contextMenu._onMouseDown({originalEvent: e.srcEvent});
|
||||
this._map._docLayer._postMouseEvent('buttondown', mousePos.x, mousePos.y, 1, 1, 0);
|
||||
|
|
Loading…
Reference in a new issue