diff options
author | alecpl <alec@alec.pl> | 2011-08-02 14:38:15 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-08-02 14:38:15 +0000 |
commit | 6e16260e630a1ebcf1726a46726f5788c8a5b329 (patch) | |
tree | ebce78b9279317a734af69078af3bdf13e3ae7c6 /program/js | |
parent | 2dd2bf5012825b68612353ccb141d6b6a0bc61aa (diff) |
- Fixed error in IE7 (#1488017)
Diffstat (limited to 'program/js')
-rw-r--r-- | program/js/common.js | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/program/js/common.js b/program/js/common.js index cacf0ff8e..c5f466ae7 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -347,13 +347,25 @@ triggerEvent: function(evt, e) break; } } - - if (ret) - delete ret.event; + if (ret && ret.event) { + try { + delete ret.event; + } catch (err) { + // IE6-7 doesn't support deleting HTMLFormElement attributes (#1488017) + $(ret).removeAttr('event'); + } + } } this._event_exec = false; - delete e.event; + if (e.event) { + try { + delete e.event; + } catch (err) { + // IE6-7 doesn't support deleting HTMLFormElement attributes (#1488017) + $(e).removeAttr('event'); + } + } return ret; } |