W3C home > Mailing lists > Public > public-html-commits@w3.org > August 2010

html5/spec-author-view dfn.js,1.8,1.9

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 19 Aug 2010 09:19:44 +0000
To: public-html-commits@w3.org
Message-Id: <E1Om1Hl-0002oj-09@lionel-hutz.w3.org>
Update of /sources/public/html5/spec-author-view
In directory hutz:/tmp/cvs-serv10813

Modified Files:
	dfn.js 
Log Message:
fixxed title clicking

Index: dfn.js
===================================================================
RCS file: /sources/public/html5/spec-author-view/dfn.js,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- dfn.js	19 Aug 2010 08:51:11 -0000	1.8
+++ dfn.js	19 Aug 2010 09:19:42 -0000	1.9
@@ -42,11 +42,14 @@
   if (node.tagName == "DFN") {
     dfnClicked = true;
   }
-  while (node && node.parentNode && (node.nodeType != event.target.ELEMENT_NODE || node.tagName == "A" || !node.hasAttribute("id")))
-    node = node.parentNode;
+  while (node && node.parentNode && (node.nodeType != event.target.ELEMENT_NODE || node.tagName == "A" || !node.hasAttribute("id"))) {
     if (node.nodeType == node.ELEMENT_NODE && node.tagName == "DFN") {
       dfnClicked = true;
     }
+    node = node.parentNode;
+  }
+  console.log(node);
+  console.log(dfnClicked);
   var panel = document.createElement('div');
   panel.className = 'dfnPanel';
   if (node && dfnClicked) {
Received on Thursday, 19 August 2010 09:19:46 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:10:02 UTC