Bug Tracker

Modify

Ticket #7059 (closed bug: duplicate)

Opened 3 years ago

Last modified 3 years ago

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

comment:1 Changed 3 years ago by snover

  • need changed from Review to Test Case

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

comment:2 Changed 3 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 3 years ago by snover

  • Priority set to undecided
  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #7071.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.