Ticket #7059 (closed bug: duplicate)
error in click."specialSubmit" handler when clicking object at OpenLayers map in IE
| Reported by: | avodonosov | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.4.3 |
| Component: | event | Version: | 1.4.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
The problem:
When clicking an object on OpenLayers map (a "feature" in OpenLayers terms), javascript error occurs in IE.
The error happens at line 2202 of jquery-1.4.2.js (corresponds to the event.js line 670 in the git revision 3a0a352).
var elem = e.target, type = elem.type;
The problem is that the expression elem.type throws an exception.
This is because the elem is a DOM node of type HTMLGenericElement. (it corresponds to <ovl:rect> tag created by OpenLayers map).
Unlike normal javascript objects, IE's "native" DOM elements often throw exception when unexisting property is accessed.
I would suggest to check first that elem.nodeName === "INPUT" (and also use the same check in the "keypress.specialSubmit" handler few lines bellow)
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Could you please provide a link to a demo/test case?