Opened 5 years ago

Closed 5 years ago

#17707 closed defect (wontfix)

Dialog: scrolls to top when clicking on map/area objects, versions 1.9.1, 1.9.2.

Reported by: smartwind Owned by:
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.9.2
Keywords: Cc:
Blocked By: Blocking:

Description

I create new Dialog in dojo 1.9.1 with map control inside it and with vertical scroll bar. When I click map control, all ok. But when I scroll dialog down and click map control, nothing happend. Scroll bar just move to top. In dojo 1.8.5 all works fine.

Attachments (2)

dlg.html (41.6 KB) - added by smartwind 5 years ago.
metro1.gif (26.0 KB) - added by smartwind 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by smartwind

Attachment: dlg.html added

Changed 5 years ago by smartwind

Attachment: metro1.gif added

comment:1 Changed 5 years ago by smartwind

You should click on the circle metro station inside the map

comment:2 Changed 5 years ago by smartwind

You should replace 1.8.5 to 1.9.1 or 1.9.2 to see the problem. Source file contains correct behaviour in dojo 1.8.5

comment:3 Changed 5 years ago by bill

Component: GeneralDijit
Resolution: wontfix
Status: newclosed
Summary: Dijit.Dialog works bad with html map/area objects, versions 1.9.1, 1.9.2.Dialog: scrolls to top when clicking on map/area objects, versions 1.9.1, 1.9.2.

OK, yes, I see the problem in your test case, and it started with 49339a0685729c69df92e91138788a6b50cdf2ef.

The issue is that when you click a circle on the map, it sends focus to the <area> node, which is outside of the Dialog. The <area> node is under the <map> node which is directly under <body>.

If you put the <map> node inside the Dialog, next to the <img> node, then everything works fine.

I don't think it's worth adding code to dijit to handle this special case where the<map> node is outside the Dialog ; it's easier to just put the <map> node inside. I'm going to mark this a wontfix, unless there's some reason you can't move the map node.

Another simple workaround would be to redefine the focus() method on your Dialog instance to do nothing.

Note: See TracTickets for help on using tickets.