Bug 951142: check for a close method to be present on the binding before invoking it. r=gavin

This commit is contained in:
Mike de Boer 2014-01-09 11:59:58 +01:00
parent 174a50ba42
commit e9b4243955

View File

@ -1169,7 +1169,12 @@
</implementation>
<handlers>
<handler event="keypress" keycode="VK_ESCAPE" phase="capturing" action="this.close();" preventdefault="true"/>
<!--
- We have to guard against `this.close` being |null| due to an unknown
- issue, which is tracked in bug 957999.
-->
<handler event="keypress" keycode="VK_ESCAPE" phase="capturing"
action="if (this.close) this.close();" preventdefault="true"/>
</handlers>
</binding>
</bindings>