Ticket #8138 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

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

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.

Change History

comment:1 Changed 2 years ago by scott.gonzalez

  • Component changed from ui.core to ui.datepicker

comment:3 Changed 2 years ago by Jasvir Nagra

  • Status changed from new to closed
  • Resolution set to fixed

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

comment:4 Changed 2 years ago by Jasvir Nagra

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

comment:5 Changed 2 years ago by scott.gonzalez

  • Milestone changed from 1.9 to 1.8.19
Note: See TracTickets for help on using tickets.