Ticket #3003 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

IE throws an error when closing the Browser Window

Reported by: jepe Owned by:
Priority: minor Milestone: 2.11 Release
Component: Handler.Box Version: 2.10
Keywords: IE error dragHandler Cc: peter.jehle@…, sprivera
State: Needs More Work

Description

The Openlayers Applikation works fine until I close the Browser Window in IE Version 8. When Closing the Browser Window, I get the error "this.DragHandler is null or not a object" Line 183 of /Handler/Box.js This error occurs only in IE. Since I use Openlayers in combination with geoext 1.0, geoext UX and my own code, I have no idea where the error comes from. I tried my application with Openlayers 2.9 and geoext 0.7. With this API-Versions, the error didn't occur.

Attachments

openlayers-3003.patch Download (0.6 KB) - added by ahocevar 2 years ago.
openlayers-3003-with-testcase.patch Download (1.9 KB) - added by bartvde 2 years ago.
same patch, but adding a testcase for destroy

Change History

  Changed 2 years ago by ahocevar

  • state changed from Awaiting User Feedback to Review

This is a regression introduced by r10422. The Handler::destroy method calls Handler.Box::deactivate, which accessed the dragHandler, which is destroyed already. So the fix is to change the destroy method to call destroy on the superclass first, and then remove the dragHandler. See attached patch.

Tests for Handler.Box are still missing, but all other tests still pass. Thanks for any review.

Changed 2 years ago by ahocevar

  Changed 2 years ago by jepe

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

works fine thank you

  Changed 2 years ago by ahocevar

  • status changed from closed to reopened
  • resolution fixed deleted

Please don't change the ticket state to fixed - this is to be done by a developer after committing the fix.

Changed 2 years ago by bartvde

same patch, but adding a testcase for destroy

  Changed 2 years ago by bartvde

  • state changed from Review to Commit

Good catch Andreas, fix looks good, I added one testcase for the destroy. Please commit.

  Changed 2 years ago by ahocevar

closed by [11145] "fixing error when closing page in IE. Thanks bartvde for the testcase. r=bartvde"

  Changed 2 years ago by ahocevar

  • status changed from reopened to closed
  • state changed from Commit to Complete
  • resolution set to fixed

  Changed 2 years ago by sprivera

  • cc sprivera added
  • state changed from Complete to Needs More Work

I am using OpenLayers 2.10 and IE 7 and after applying the patch I am still getting the error when closing the browser window.

  Changed 2 years ago by sprivera

  • status changed from closed to reopened
  • resolution fixed deleted

follow-up: ↓ 10   Changed 2 years ago by ahocevar

@sprivera: please try latest OpenLayers trunk instead of applying this patch to OpenLayers 2.10, and report back if it works.

in reply to: ↑ 9   Changed 2 years ago by sprivera

Replying to ahocevar:

@sprivera: please try latest OpenLayers trunk instead of applying this patch to OpenLayers 2.10, and report back if it works.

Thanks for the tip, it appears the error does not occur when using the latest OpenLayers trunk. Is there an estimate when this fix will be available in a stable version?

  Changed 2 years ago by tschaub

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

We're working to close tickets towards the 2.11 release right now.

Note: See TracTickets for help on using tickets.