WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
230688
REGRESSION (Safari 15): Toggling object element display property reloads the object
https://bugs.webkit.org/show_bug.cgi?id=230688
Summary
REGRESSION (Safari 15): Toggling object element display property reloads the ...
Ben
Reported
2021-09-23 06:10:55 PDT
When you toggle <object> HTML element between display:block and display:none the object is reloaded. Didn't happen on iPadOS 14.0 and doesn't happen on Chrome and FireFox. Tested on iPadOS 15.0, 14.8 To reproduce see that the timestamp on Safari changes every time you click on the 'Toggle Display' button. On Chrome and Firefox the timestamp doesn't change.
https://jsbin.com/yoboxuhegu/1/edit?html,output
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> </head> <body> <button onclick="toggleDisplay()">Toggle Display</button> <object style="display: block;" data="data:text/html;utf-8,<body onload='document.body.innerText = Date.now()'>hello"></object> <script> let el = document.querySelector('object'); let count = 1; function log() { el.text = count; count++; } function toggleDisplay() { let display = el.style.display == 'block' ? 'none' : 'block'; el.style.display = display; } </script> </body> </html>
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-09-25 12:09:50 PDT
<
rdar://problem/83534931
>
Ahmad Saleem
Comment 2
2022-08-10 04:29:27 PDT
I am able to reproduce this bug in Safari 15.6 and Technical Preview 150 on macOS 12.5 and toggling "Display" button changes timestamp every time unlike other browsers (Chrome Canary 106 and Firefox Nightly 105). Thanks!
Ahmad Saleem
Comment 3
2023-06-14 15:59:33 PDT
Adding 'BrowserCompat' since it is still reproducible in STP172.
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