1 parent 9977e33 commit 9a1a44aCopy full SHA for 9a1a44a
1 file changed
src/lib/components/Pointer.svelte
@@ -38,11 +38,15 @@
38
follower.target = { x: pageX, y: pageY };
39
isVisible = true;
40
41
- if (target instanceof Element) {
42
- const tagName = target.tagName.toLowerCase();
43
- isVisible = tagName !== 'p';
44
- isHovering = ['a', 'button'].includes(tagName);
+ if (target && target instanceof Element) {
+ const cursor = getComputedStyle(target).cursor;
+ isHovering = cursor === 'pointer';
+ if (!isHovering) {
45
+ const tagName = target.tagName.toLowerCase();
46
+ isVisible = !['li', 'p'].includes(tagName) || !(target.textContent?.trim() ?? '');
47
+ }
48
}
49
+
50
} else {
51
isVisible = false;
52
0 commit comments