Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Also show an image infotip on image inputs

  • Loading branch information...
commit cb36bf6ff8aa4d5363b612b4b2dfbc623676380a 1 parent f57114d
@SebastianZ SebastianZ authored
Showing with 14 additions and 10 deletions.
  1. +14 −10 extension/content/firebug/html/htmlPanel.js
View
24 extension/content/firebug/html/htmlPanel.js
@@ -1648,20 +1648,24 @@ Firebug.HTMLPanel.prototype = Obj.extend(WalkingPanel,
if (!Css.hasClass(target, "nodeValue"))
return;
- var attribute = Dom.getAncestorByClass(target, "nodeAttr");
- var nodeName = attribute.getElementsByClassName("nodeName").item(0).textContent;
-
var node = Firebug.getRepObject(target);
- if (node && node.nodeType == 1 && node.localName.toUpperCase() == "IMG" && nodeName == "src")
+ if (node && node.nodeType == 1)
{
- var url = node.src;
+ var nodeName = node.localName.toUpperCase();
+ var attribute = Dom.getAncestorByClass(target, "nodeAttr");
+ var attributeName = attribute.getElementsByClassName("nodeName").item(0).textContent;
- // This state cleared in hide()
- if (url == this.infoTipURL)
- return true;
+ if ((nodeName == "IMG" || nodeName == "INPUT") && attributeName == "src")
+ {
+ var url = node.src;
- this.infoTipURL = url;
- return CSSInfoTip.populateImageInfoTip(infoTip, url);
+ // This state cleared in hide()
+ if (url == this.infoTipURL)
+ return true;
+
+ this.infoTipURL = url;
+ return CSSInfoTip.populateImageInfoTip(infoTip, url);
+ }
}
},
Please sign in to comment.
Something went wrong with that request. Please try again.