- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 06 May 2011 04:09:08 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec-author-view In directory hutz:/tmp/cvs-serv22347 Modified Files: dfn.js Log Message: Fix event handler attribute interaction with ES (whatwg r6099) [updated by splitter] Index: dfn.js =================================================================== RCS file: /sources/public/html5/spec-author-view/dfn.js,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- dfn.js 22 Apr 2011 09:17:55 -0000 1.19 +++ dfn.js 6 May 2011 04:09:06 -0000 1.20 @@ -48,13 +48,16 @@ } var dfnPanel; document.addEventListener('click', dfnShow, false); -document.addEventListener("keyup", function(e) { +document.addEventListener("keydown", function(e) { if(!e) e=window.event; var key = e.keyCode ? e.keyCode : e.which; if ( key == 27 && dfnPanel) { dfnPanel.parentNode.removeChild(dfnPanel); dfnPanel = null; } + if (key === 32 || key === 13) { + window.dfnShow(e); + } }, true); function dfnShow(event) { if (dfnPanel) {
Received on Friday, 6 May 2011 04:09:10 UTC