aboutsummaryrefslogtreecommitdiffstats
path: root/linkHints.js
diff options
context:
space:
mode:
authorPeter Parks2012-01-24 20:11:17 -0800
committerPeter Parks2012-01-24 20:11:17 -0800
commit276509604d7bdcea4b1be89ed78be67d95ef816c (patch)
tree4211b3ebe6faa743aa6ed9eacad98b74fb8bfef8 /linkHints.js
parent76a8883f30d6473adacd8e1b1aab48cd89d8f385 (diff)
downloadvimium-276509604d7bdcea4b1be89ed78be67d95ef816c.tar.bz2
Fix hidden image map issue
issue #461 img.getClientRects() was returning an empty object instead of false when the img map was not displayed. So instead of checking for a false object, check for the length of items instead.
Diffstat (limited to 'linkHints.js')
-rw-r--r--linkHints.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/linkHints.js b/linkHints.js
index ce5b80ed..14747f16 100644
--- a/linkHints.js
+++ b/linkHints.js
@@ -132,7 +132,7 @@ var linkHints = {
var img = document.querySelector("img[usemap='#" + map.getAttribute("name") + "']");
if (!img) continue;
var imgClientRects = img.getClientRects();
- if (!imgClientRects) continue;
+ if (imgClientRects.length == 0) continue;
var c = element.coords.split(/,/);
var coords = [parseInt(c[0], 10), parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10)];
var rect = {