Skip to main content

Search and Top Navigation

#8138 closed bug (fixed)

Opened February 24, 2012 09:57PM UTC

Closed February 25, 2012 12:12PM UTC

Last modified February 25, 2012 12:13PM UTC

datepicker: Reused event variable in catch block may cause problems in IE8

Reported by: jasvir Owned by:
Priority: minor Milestone: 1.8.19
Component: ui.datepicker Version: 1.8.18
Keywords: Cc:
Blocked by: Blocking:
Description

datepicker reuses a variable declared in an enclosing function as a catch block variable:

_doKeyUp: function(event) {

...

try {

...

} catch (event) {

$.datepicker.log(event);

}

Some browsers (specifically IE8) does not create a new scope for the catch block and as a result linters like JSLint and Caja complain about this reuse. In this case, the variable name is not a good name for the exception either.

Attachments (0)
Change History (5)

Changed February 24, 2012 09:59PM UTC by scottgonzalez comment:1

component: ui.coreui.datepicker

Changed February 25, 2012 02:20AM UTC by jasvir comment:2

Changed February 25, 2012 12:12PM UTC by Jasvir Nagra comment:3

resolution: → fixed
status: newclosed

Datepicker: modified a catch variable to no longer mask an existing variable in scope. Fixed #8138 - datepicker: IE8 does not create a new scope for catch blocks and will cause

Changeset: 367da95ba5afcb80bebce75cd529a46004f60381

Changed February 25, 2012 12:12PM UTC by Jasvir Nagra comment:4

Datepicker: modified a catch variable to no longer mask an existing variable in scope. Fixed #8138 - datepicker: IE8 does not create a new scope for catch blocks and will cause

(cherry picked from commit 367da95ba5afcb80bebce75cd529a46004f60381)

Changeset: 5c2eea3fd9bdb069fba6ce962aa885c49b4615a0

Changed February 25, 2012 12:13PM UTC by scottgonzalez comment:5

milestone: 1.91.8.19