projects
/
vimb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84b859e
)
Better check if a none dimension element is hintable (#62).
author
Daniel Carl
<danielcarl@gmx.de>
Sun, 19 Jan 2014 22:07:12 +0000
(23:07 +0100)
committer
Daniel Carl
<danielcarl@gmx.de>
Sun, 19 Jan 2014 22:14:17 +0000
(23:14 +0100)
src/hints.js
patch
|
blob
|
history
diff --git
a/src/hints.js
b/src/hints.js
index
cb4a503
..
d4e6fa3
100644
(file)
--- a/
src/hints.js
+++ b/
src/hints.js
@@
-120,6
+120,18
@@
Object.freeze((function(){
return false;
}
+ if ((!rect.width || !rect.height) && (e.textContent || !e.name)) {
+ var arr = Array.prototype.slice.call(e.childNodes);
+ var check = function(e) {
+ return e instanceof Element
+ && e.style.float != "none"
+ && isVisible(e);
+ };
+ if (!arr.some(check)) {
+ return false;
+ }
+ }
+
var s = win.getComputedStyle(e, null);
return s.display !== "none" && s.visibility == "visible";
}