Ticket #3252 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

DragFeature control keeps dragging after mouseUp

Reported by: ahocevar Owned by: tschaub
Priority: major Milestone: 2.11 Release
Component: Control.DragFeature Version: SVN
Keywords: Cc:
State: Commit

Description

This is a regression from 2.10. To reproduce:

Attachments

openlayers-3252.patch Download (1.0 KB) - added by ahocevar 2 years ago.
no tests yet
openlayers-3252.2.patch Download (1.9 KB) - added by ahocevar 2 years ago.
with tests

Change History

Changed 2 years ago by ahocevar

  • component changed from Control.DragFeature to Handler.Drag
  • summary changed from DragFeature control keeps dragging after mouseUp to Drag handler keeps dragging after mouseUp

Changed 2 years ago by ahocevar

  • component changed from Handler.Drag to Control.DragFeature
  • summary changed from Drag handler keeps dragging after mouseUp to DragFeature control keeps dragging after mouseUp

It seems this is caused by the clickFeature method, which calls dragstart on the drag handler.

Changed 2 years ago by ahocevar

no tests yet

Changed 2 years ago by ahocevar

with tests

Changed 2 years ago by ahocevar

  • state set to Review

Tests pass in Safari 5. Thanks for any review (especially from reviewers who can confirm that this doesn't break behavior on mobile devices).

Changed 2 years ago by tschaub

  • state changed from Review to Commit

Fantastic. Thanks for figuring this out. I've tested examples on FF4 and the iPhone Simulator. Everything looks slick. Please commit.

Changed 2 years ago by ahocevar

  • status changed from new to closed
  • resolution set to fixed

(In [11888]) Only start dragging when we are over a feature. r=tschaub (closes #3252)

Changed 2 years ago by erilem

drag-feature.html and mobile-drawing.html work as expected in my iPhone. Thanks for the fix Andreas.

Note: See TracTickets for help on using tickets.