Skip to content

Commit bb65174

Browse files
authored
Fix: #2294 Hints overflow the page (#2295)
1 parent 3d799e1 commit bb65174

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/content_scripts/common/hints.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ div.hint-scrollable {
193193
[mode=input] mask.activeInput {
194194
background: rgba(0, 0, 255, 0.25);
195195
}`);
196+
/* When the <style> loaded, set host's height */
197+
hintsStyle.onload = () =>
198+
{ hintsHost.style.height = `${window.scrollY + window.innerHeight}px`; }
199+
196200
hintsHost.shadowRoot.appendChild(hintsStyle);
197201
const regionalHints = createRegionalHints(clipboard);
198202

src/content_scripts/content.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ div.surfingkeys_hints_host {
22
display: block;
33
opacity: 1;
44
color-scheme: auto;
5-
position: static;
5+
position: absolute;
6+
inset: 0 0 auto 0;
7+
overflow: hidden;
68
}
79
div.surfingkeys_match_mark {
810
background-color: #ff0;

0 commit comments

Comments
 (0)