Ticket #3280 (closed feature: fixed)

Opened 2 years ago

Last modified 2 years ago

Incorrect event types

Reported by: ahocevar Owned by: ahocevar
Priority: minor Milestone: 2.11 Release
Component: Control.TransformFeature Version: 2.10
Keywords: Cc:
State: Commit

Description

If an application registers listeners for both the "beforesetfeature" and "setfeature" events, both events will pass the same event object (i.e. with the "beforesetfeature" type for the "setfeature" event) to the listeners.

Attachments

openlayers-3280.patch Download (2.3 KB) - added by ahocevar 2 years ago.

Change History

Changed 2 years ago by ahocevar

Changed 2 years ago by ahocevar

  • state set to Review
  • milestone changed from 2.12 Release to 2.11 Release

Tests pass in Safari5. Thanks for any review.

Please set milestone back to 2.12 if we're in the middle of the 2.11 release process already.

Changed 2 years ago by jbelem

Thanks for the quick patch, Andreas. I can confirm that setfeature event type was just incorrect while also a beforesetfeature event was registered; solely a setfeature event registered did not show up that issue. I tested your patch and it works fine for me!

Changed 2 years ago by bartvde

  • state changed from Review to Commit

Looks good Andreas, please commit since this is trivial.

Changed 2 years ago by ahocevar

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

(In [11958]) do not reuse event objects to avoid incorrect event types. r=bartvde (closes #3280)

Note: See TracTickets for help on using tickets.