OpenLayers OpenLayers

Ticket #554 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

click event and PanZoom control conflict

Reported by: openlayers Assigned to: crschmidt
Priority: major Milestone: 2.4 Release
Component: Control.PanZoom Version:
Keywords: Cc:
State:

Description

When a clickevent is defined, it gets activated when you click the PanZoom control. It should only be activated when clicking in the map, not when clicking the controls.

Earlier openlayers versions did not show this behavior.

Example: http://openlayers.org/dev/examples/click.html

Attachments

panZoom.click.patch (0.7 kB) - added by tschaub on 04/06/07 15:40:39.
panZoom buttons should stop click
removeFeatures.tested.patch (1.5 kB) - added by tschaub on 04/06/07 18:02:48.
fix and tests
panZoom.click.tested.patch (6.5 kB) - added by tschaub on 04/06/07 18:03:34.
fix and tests (for real)

Change History

03/23/07 06:36:07 changed by openlayers

ok, the problem is only with version 2.3. 2.2 behaves as expected.

04/05/07 14:03:35 changed by sderle

  • milestone set to 2.4 Release.

04/06/07 15:40:39 changed by tschaub

  • attachment panZoom.click.patch added.

panZoom buttons should stop click

04/06/07 16:03:24 changed by crschmidt

#484 caused this regression.

04/06/07 18:02:48 changed by tschaub

  • attachment removeFeatures.tested.patch added.

fix and tests

04/06/07 18:03:34 changed by tschaub

  • attachment panZoom.click.tested.patch added.

fix and tests (for real)

04/06/07 18:06:20 changed by tschaub

  • keywords changed from click event control conflict to review.
  • owner set to crschmidt.
  • component changed from Events to Control.PanZoom.

Apologies for the trac spam - that removeFeatures.tested.Patch was for another ticket.

The panZoom.click.tested.patch is for this ticket (I'm having fun with patch names).

Please review. (These tests show that none of mousedown, mouseup, click, and dblclick get through the pan zoom buttons to the map. Was mouseup supposed to make it through?)

04/09/07 09:23:07 changed by crschmidt

  • keywords changed from review to pullup.

To solve this problem, we'll just go with this patch. Mouseup should probably make it through -- otherwise, you can't drop the map when dragging while on top of the panzoom controls -- but I consider that to be something different, since this is a clear regression from earlier code as a result of #484.

Committed this as r3033 (ooh, neat) and marking fr pullup.

04/19/07 21:14:58 changed by crschmidt

Brought up to 2.4 branch for RC2 with r3088

04/19/07 21:21:06 changed by crschmidt

  • keywords deleted.
  • status changed from new to closed.
  • resolution set to fixed.