Bug Tracker

Opened 8 years ago

Closed 8 years ago

#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:
Blocked by: Blocking:

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 (3)

comment:1 Changed 8 years ago by snover

need: ReviewTest Case

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

comment:2 Changed 8 years ago by avodonosov

Sorry, I tried, but I can't isolate the problem in a small self-contained test case.

But this problem is 100% reproducible in the large application I am working on.

comment:3 Changed 8 years ago by snover

Priority: undecided
Resolution: duplicate
Status: newclosed

Duplicate of #7071.

Note: See TracTickets for help on using tickets.