WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
280944
Typing inside an <input> with several fonts applied causes page to scroll to the top
https://bugs.webkit.org/show_bug.cgi?id=280944
Summary
Typing inside an <input> with several fonts applied causes page to scroll to ...
benblayer@gmail.com
Reported
2024-10-06 06:28:11 PDT
Created
attachment 472829
[details]
A CodePen reproduction of the issue When applying some fonts to <input> element in Safari and typing inside of it, the page scrolls to the top (also, placeholder text isn't visible).
Attachments
A CodePen reproduction of the issue
(65 bytes, text/plain)
2024-10-06 06:28 PDT
,
benblayer@gmail.com
no flags
Details
rendering in safari
(1.43 MB, image/png)
2024-11-07 20:52 PST
,
Karl Dubost
no flags
Details
rendering in safari, firefox, chrome
(1.57 MB, image/png)
2024-11-07 21:11 PST
,
Karl Dubost
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-10-13 06:29:13 PDT
<
rdar://problem/137832602
>
Ahmad Saleem
Comment 2
2024-10-13 17:09:23 PDT
*** Safari 18.1 Beta *** Page scroll up as soon as you focus on the textarea / input *** Chrome Canary 131 *** Can focus on textarea / input but couldn't type into it. *** Firefox Nightly 133 *** Can focus on textarea / input but can type into it.
Karl Dubost
Comment 3
2024-11-07 20:00:11 PST
To make sure people, do the right thing. 1. Go to
https://codepen.io/benblayer/pen/wvVWpgE
2. Scroll to the botton of the page 3. Click in the textarea 4. Enter the letter a Safari Technology Preview 206 20621.1.3.21.1 scroll to the top Firefox Nightly 134.0a1 13424.11.7 a appears in the textarea Google Chrome Canary 132.0.6825.0 6825.0 nothing Safari [Log] event: blur, target: [object HTMLTextAreaElement] (vendor-18edf1dfe16da6311df8.chunk.js, line 1) [Log] event: blur, target: [object Window] (vendor-18edf1dfe16da6311df8.chunk.js, line 1) Firefox blur { target: Window, isTrusted: true, view: Window, detail: 0, layerX: 0, layerY: 0, which: 0, rangeOffset: 0, SCROLL_PAGE_UP: -32768, SCROLL_PAGE_DOWN: 32768, … } And this indeed related only to the fonts. Without the font-face, this is working as expected. What a weird interesting issue. Thanks benblayer Adding Vitor.
Simon Fraser (smfr)
Comment 4
2024-11-07 20:34:02 PST
We scroll to the top because typing a character triggers scrolling the selection into view, but we'e computed a selection rect which is at 0,0. I think the line height computes to 0 somewhere.
Karl Dubost
Comment 5
2024-11-07 20:38:23 PST
When commenting out the font-face on input AFTER typing, the character appears: input { /* font-family: 'Custom font', sans-serif; */ height: 50px; }
Karl Dubost
Comment 6
2024-11-07 20:52:13 PST
Created
attachment 473175
[details]
rendering in safari The font has weird rendering sometimes as seen in the screenshot. The font seems to be a variation of Gotham-Book.
Karl Dubost
Comment 7
2024-11-07 21:11:59 PST
Created
attachment 473177
[details]
rendering in safari, firefox, chrome Another issue with the font itself it seems unable to wrap up lines longer than the viewport. So there is really an issue with the font itself. See
https://codepen.io/webcompat/pen/eYqQmyZ
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug