Ticket #2850 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

Control should set this.div to null in destroy

Reported by: bartvde Owned by:
Priority: minor Milestone: 2.11 Release
Component: Control Version: 2.10
Keywords: Cc: xavier.mamano@…
State: Review

Description

currently Control does not set this.div to null in the destroy function. It should.

Attachments

ol-2850.patch Download (1.3 KB) - added by bartvde 3 years ago.
ol-2850-without-collision.patch Download (2.2 KB) - added by jorix 2 years ago.

Change History

  Changed 3 years ago by bartvde

  • state set to Review

  Changed 3 years ago by fredj

  • state changed from Review to Commit

  Changed 3 years ago by bartvde

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

The closes hook seems to be down, so r10789

  Changed 3 years ago by ahocevar

  • status changed from closed to reopened
  • resolution fixed deleted

r10789 makes the PanZoom tests fail - that control removes buttons from the div after the div has been destroyed by super.destroy.

  Changed 3 years ago by ahocevar

In fact, r10789 makes the tests for many controls fail, including OpenLayers.Control.

  Changed 3 years ago by bartvde

Oops, let me undo this change until I get time to investigate. Sorry for the noise.

  Changed 3 years ago by bartvde

Undo done in r10790 need to investigate why this is causing problems.

  Changed 3 years ago by bartvde

Okay, it seems the PanZoom destructor is the only one causing the problems, I'll upload a new patch for review :-)

Thanks Andreas for catching this!

follow-up: ↓ 10   Changed 3 years ago by bartvde

  • state changed from Commit to Review

All control tests pass again in FF 3.6 and IE6, please review.

This should teach me to think an innocent one-line patch exists ... :-)

in reply to: ↑ 9   Changed 3 years ago by jorix

Replying to bartvde:

All control tests pass again in FF 3.6 and IE6, please review. This should teach me to think an innocent one-line patch exists ... :-)

Is best left three test in panel.html. Only need to change line 246 in panel.html removing "panel." leaving:

t.ok (div.innerHTML == ""

and test works.
I neglected to remove the "panel." in that line in my ticket #2835, sorry.

Changed 3 years ago by bartvde

follow-up: ↓ 12   Changed 3 years ago by bartvde

thanks jorix, good suggestion, I've updated the patch.

in reply to: ↑ 11   Changed 3 years ago by jorix

  • cc xavier.mamano@… added

Please see:  http://trac.osgeo.org/openlayers/ticket/2835#comment:6 and 7

There has been a clash of tickets!

Changed 2 years ago by jorix

  Changed 2 years ago by jorix

@bartvde: In attachment:ol-2850-without-collision.patch Download I removed the effects of the  collision with Panel, and I made a change for compatibility in tests/PanZoomBar.html (due to r11228), no change in the effects of the test before the patch. Is it right for you?

@reviewer: The test of all controls work properly in FF and Safari.

  Changed 2 years ago by bartvde

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

(In [11631]) Control should set this.div to null in destroy, thanks jorix for the updated patch, p=jorix,me r=me,fredj (closes #2850)

Note: See TracTickets for help on using tickets.