diff --git a/package-lock.json b/package-lock.json index 8bdefc69..e8f5b9fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@d-i-t-a/reader", - "version": "2.3.12", + "version": "2.3.13", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@d-i-t-a/reader", - "version": "2.3.12", + "version": "2.3.13", "license": "Apache-2.0", "dependencies": { "@types/pdfjs-dist": "^2.7.4", diff --git a/package.json b/package.json index 25c42f0e..0561d07e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@d-i-t-a/reader", - "version": "2.3.12", + "version": "2.3.13", "description": "A viewer application for EPUB files.", "repository": "https://github.com/d-i-t-a/R2D2BC", "license": "Apache-2.0", diff --git a/src/modules/highlight/TextHighlighter.ts b/src/modules/highlight/TextHighlighter.ts index 24ee198a..5fcd1102 100644 --- a/src/modules/highlight/TextHighlighter.ts +++ b/src/modules/highlight/TextHighlighter.ts @@ -1122,6 +1122,8 @@ export class TextHighlighter { toolbox.style.transform = "revert"; toolbox.style.width = "100%"; toolbox.style.textAlign = "center"; + toolbox.style.position = "absolute"; + toolbox.style.setProperty("--content", "revert"); } else if (this.properties?.menuPosition === MenuPosition.BOTTOM) { toolbox.style.bottom = "0px"; toolbox.style.left = "0px"; @@ -1129,6 +1131,7 @@ export class TextHighlighter { toolbox.style.width = "100%"; toolbox.style.textAlign = "center"; toolbox.style.position = "absolute"; + toolbox.style.setProperty("--content", "revert"); } else { const paginated = this.navigator.view?.isPaginated(); if (paginated) { diff --git a/src/styles/sass/reader/_toolbox.scss b/src/styles/sass/reader/_toolbox.scss index 4c3c9b9e..9b025f1c 100644 --- a/src/styles/sass/reader/_toolbox.scss +++ b/src/styles/sass/reader/_toolbox.scss @@ -27,9 +27,10 @@ background: gainsboro; display: none; width: fit-content; + --content: ''; &:before { $size: 0.4rem; - content: ''; + content: var(--content); position: absolute; width: $size; height: $size;