Ticket #471 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

Layer.Text markers show a popup even if no popup text is set

Reported by: openlayers Owned by: sderle
Priority: minor Milestone: 2.4 Release
Component: Layer.Text Version: 2.2
Keywords: Cc:
State:

Description

When using Layer.Text, if the text file does not contain description or title for a popup to appear on click of the marker, a popup is still applied. This results in a popup appearing with no obvious way to close it.

OpenLayers\Layer\Text.js should first check on line 129 if title and description is not null before assigning the onClick handler.

Attachments

Text.js.diff Download (0.8 KB) - added by danielm 6 years ago.
Changes the text layer so if title and description is null then the marker onClick event is not set. This makes the unit tests fail though cause they are expecting the onClick handler.
text_layer.patch Download (3.0 KB) - added by crschmidt 6 years ago.
same as other patch, adds tests for both cases
471.patch Download (3.4 KB) - added by sderle 6 years ago.

Change History

Changed 6 years ago by danielm

Changes the text layer so if title and description is null then the marker onClick event is not set. This makes the unit tests fail though cause they are expecting the onClick handler.

Changed 6 years ago by danielm

  • keywords review added

Changed 6 years ago by crschmidt

  • milestone set to 2.4 Release

danielm: an update to the tests to include one item which has an onclick and one that doesn't, and adjusting the responses to fit that, would make me happier about this. If you can add that, I'll apply/review/commit.

Changed 6 years ago by crschmidt

same as other patch, adds tests for both cases

Changed 6 years ago by crschmidt

New patch updates tests, awaiting review.

Changed 6 years ago by crschmidt

  • keywords marker popup removed

Changed 6 years ago by sderle

  • owner changed from crschmidt to sderle
  • status changed from new to assigned

07:12 < Schuyler> on #471, is it possible that a user might want to render a

popup with either a title or a description, even if the other one is missing?

07:13 < crschmidt> yes 07:13 < crschmidt> I'd say that "&&" should be an

Changed 6 years ago by sderle

that should be "pipe pipe" ... darn Trac

Changed 6 years ago by sderle

Changed 6 years ago by crschmidt

Patch is good in my eyes.

Changed 6 years ago by sderle

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

For reasons that aren't clear, my patch causes horrible test failures. Rather than continue to fight with this, I'm going to commit Chris's patch instead and move on.

Fixed by r2820.

Changed 6 years ago by euzuro

  • keywords review removed
Note: See TracTickets for help on using tickets.