[OpenLayers-Trac] Re: [OpenLayers] #3404:
OpenLayers.Control.SelectFeature stops
selecting features after a right click on the map
OpenLayers
trac-20090302 at openlayers.org
Sat Sep 17 17:15:30 EDT 2011
#3404: OpenLayers.Control.SelectFeature stops selecting features after a right
click on the map
-----------------------------------+----------------------------------------
Reporter: aviaron | Owner: tschaub
Type: bug | Status: new
Priority: major | Milestone: 2.12 Release
Component: Control.SelectFeature | Version: 2.10
Keywords: | State: Review
-----------------------------------+----------------------------------------
Changes (by jwalgran):
* state: => Review
Comment:
This bug shows up on a few of the example pages as well.
http://openlayers.org/dev/examples/select-feature.html
http://openlayers.org/dev/examples/highlight-feature.html
When a SelectFeature control and a Navigation control are added to a map
the left-click mousedown events are stopped by a Drag handler before
reaching the Feature handler. However, right-click mousedown events so
pass through and reach the Feature handler.
The Feature handler records the xy of each mousedown and mouseup events so
they can be compared in the click event. Because only right-click
mousedown event are received the location of future left-click mouseup
events are compared to the location of the 'stale' right-click mousedown
event resulting in the feature not being selected.
I attached 3404.patch to this ticket which resolves the issue by checking
for lef or right in the mousedown function of the Feature handler.
This bug is only triggered by physical right mouse clicks so it is not
possible to write an automated js unit test. The patch also includes a new
tests/Control/SelectFeatureRightClick.html page including an interactive
test with steps to reproduce the bug.
--
Ticket URL: <http://trac.openlayers.org/ticket/3404#comment:5>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list