WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
216398
Image dimensions ignored on iOS mobile Safari when image is child of button
https://bugs.webkit.org/show_bug.cgi?id=216398
Summary
Image dimensions ignored on iOS mobile Safari when image is child of button
Thomas Steiner
Reported
2020-09-10 23:48:34 PDT
Created
attachment 408516
[details]
Image dimensions ignored on iOS An image that is the child of a button has its dimensions ignored on iOS mobile Safari (see screenshot): <button type="button"> <img src="icon.png" alt="" width="120" height="120"> </button> Open
https://image-in-button.glitch.me/
on iOS mobile Safari and compare the output to desktop Safari (and all other browsers).
Attachments
Image dimensions ignored on iOS
(141.17 KB, image/jpeg)
2020-09-10 23:48 PDT
,
Thomas Steiner
no flags
Details
Correct behavior on desktop Safari
(353.59 KB, image/png)
2020-09-10 23:49 PDT
,
Thomas Steiner
no flags
Details
Screenshot on iOS 14.6
(159.33 KB, image/png)
2021-05-18 02:32 PDT
,
Thomas Steiner
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Thomas Steiner
Comment 1
2020-09-10 23:49:41 PDT
Created
attachment 408517
[details]
Correct behavior on desktop Safari
Radar WebKit Bug Importer
Comment 2
2020-09-11 10:34:14 PDT
<
rdar://problem/68718254
>
Thomas Steiner
Comment 3
2021-05-18 02:32:40 PDT
Created
attachment 428922
[details]
Screenshot on iOS 14.6
Ahmad Saleem
Comment 4
2025-09-08 09:44:21 PDT
Glitch Test Case is gone - I restored one from Wayback Archive and made this -
https://jsfiddle.net/grw25spn/
Ahmad Saleem
Comment 5
2025-09-08 09:47:46 PDT
@Thomas - I am unable to reproduce this on iOS 26 Beta - can you confirm, if it is resolved or if my test case (not retrieved from Wayback Archive is same) - so we can close this bug?
Thomas Steiner
Comment 6
2025-09-08 10:14:52 PDT
Thank you, I can confirm that this isn't a problem anymore on iOS 26 Beta. For the fun of it, I tested again on an old iPad Air 2, stuck on iOS 15, and there the border issue still occurs (the `border-radius: 0` gets ignored), but the image dimensions are respected. So I think this can be closed as fixed by now. Thank you :-D
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