From 88cbe89247a4ebdf9498d77eb0f7e675b7a4c785 Mon Sep 17 00:00:00 2001
From: Stanley Shyiko
Date: Mon, 28 Oct 2013 22:13:37 +0200
Subject: Fixed detection of links which are only partially inside the viewport
---
tests/dom_tests/dom_utils_test.coffee | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'tests')
diff --git a/tests/dom_tests/dom_utils_test.coffee b/tests/dom_tests/dom_utils_test.coffee
index d0f881ba..130a3014 100644
--- a/tests/dom_tests/dom_utils_test.coffee
+++ b/tests/dom_tests/dom_utils_test.coffee
@@ -42,6 +42,14 @@ context "Check visibility",
assert.equal null, DomUtils.getVisibleClientRect document.getElementById 'foo'
assert.equal null, DomUtils.getVisibleClientRect document.getElementById 'bar'
+ should "detect links only partially outside viewport as visible", ->
+ document.getElementById("test-div").innerHTML = """
+ test
+ test
+ """
+ assert.isTrue (DomUtils.getVisibleClientRect document.getElementById 'foo') != null
+ assert.isTrue (DomUtils.getVisibleClientRect document.getElementById 'bar') != null
+
should "detect opacity:0 links as hidden", ->
document.getElementById("test-div").innerHTML = """
test
--
cgit v1.2.3