Ticket #8138 (closed bug: fixed)
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:3 Changed 15 months 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 15 months 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

