From: Vincent Vanwaelscappel Date: Mon, 26 May 2025 17:48:03 +0000 (+0200) Subject: wait #7553 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ff8f09ec73e71bb3ebbcccaebc1954718f782d26;p=fluidbook_tools.git wait #7553 @1.5 --- diff --git a/src/Links/Link.php b/src/Links/Link.php index 9cb9fab..95ab874 100644 --- a/src/Links/Link.php +++ b/src/Links/Link.php @@ -721,6 +721,9 @@ class Link if ($this->stats) { $res .= 'data-stats="' . htmlspecialchars(json_encode($this->stats), ENT_QUOTES) . '" '; } + if ($this->isOutsidePage()) { + $res .= ' data-outside-page="1" tabindex="-1"'; + } return $res; @@ -883,7 +886,7 @@ class Link public function isOutsidePage() { - return $this->top > $this->compiler->getHeightForLinks($this->page) || $this->left > $this->compiler->getWidthForLinks($this->page); + return $this->top + $this->height <= 0 || $this->top > $this->compiler->getHeightForLinks($this->page) || $this->left > $this->compiler->getWidthForLinks($this->page) || $this->left + $this->width <= 0;; } public function ignore()