#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: | ||
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.
Change History (5)
comment:1 Changed 11 years ago by
Component: | ui.core → ui.datepicker |
---|
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
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 11 years ago by
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 11 years ago by
Milestone: | 1.9 → 1.8.19 |
---|
Patch at https://github.com/jquery/jquery-ui/pull/602