WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 211503
210512
Storage events are fired for the same tab
https://bugs.webkit.org/show_bug.cgi?id=210512
Summary
Storage events are fired for the same tab
Merih Akar
Reported
2020-04-14 13:16:18 PDT
Created
attachment 396456
[details]
testcase As per specification storage events should be fired for the tabs other than the tab that's changing the storage area, however it's also fired on the same tab in Safari. Note that the issue happens when the testcase file is served via a server, doesn't happen when you open it directly in the browser.
Attachments
testcase
(622 bytes, text/html)
2020-04-14 13:16 PDT
,
Merih Akar
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-04-14 17:47:07 PDT
<
rdar://problem/61799443
>
Jimmy Thomsen
Comment 2
2020-11-22 13:26:19 PST
I can confirm this with Safari 13.1 (14609.1.20.111.8) on macOS 10.14.6 (18G4032), as well as with Safari on iOS (iPhone) 13.7. Work around: Only execute OnStorage logic if document is not focused: if (!document.hasFocus()) { // Execute OnStorage logic - tab does not have focus } Notice though that hasFocus() will return false in the active tab if Developer Tools is open and has focus.
Jimmy Thomsen
Comment 3
2020-11-22 13:35:32 PST
Work around suggestion only makes sense if OnStorage events are triggered by user interaction, of course. Also, it seems Safari Developer Tools does not steal focus from the document - Chrome Developer Tools does.
Chris Dumez
Comment 4
2020-11-22 16:17:38 PST
This rings a bell and I thought I had fixed this. Are you able to try in Safari Technology Preview?
Chris Dumez
Comment 5
2020-11-22 16:21:34 PST
This looks a lot like
Chris Dumez
Comment 6
2020-11-22 16:22:08 PST
(In reply to Chris Dumez from
comment #5
)
> This looks a lot like
This looks a lot like
https://bugs.webkit.org/show_bug.cgi?id=211503
which got fixed.
Jimmy Thomsen
Comment 7
2020-11-23 08:21:11 PST
(In reply to Chris Dumez from
comment #6
)
> (In reply to Chris Dumez from
comment #5
) > > This looks a lot like > > This looks a lot like
https://bugs.webkit.org/show_bug.cgi?id=211503
which > got fixed.
Chris Dumez: It sure does sound like the same thing. Safari Version 14.0.1 (14610.2.11.51.9) works as expected. I can no longer reproduce the problem with localStorage. I think its safe to close this bug report, although I'm not the one who initially reported the bug - I just confirmed it. - Thank you Jimmy
Chris Dumez
Comment 8
2020-11-23 10:02:26 PST
(In reply to Jimmy Thomsen from
comment #7
)
> (In reply to Chris Dumez from
comment #6
) > > (In reply to Chris Dumez from
comment #5
) > > > This looks a lot like > > > > This looks a lot like
https://bugs.webkit.org/show_bug.cgi?id=211503
which > > got fixed. > > Chris Dumez: It sure does sound like the same thing. Safari Version 14.0.1 > (14610.2.11.51.9) works as expected. I can no longer reproduce the problem > with localStorage. I think its safe to close this bug report, although I'm > not the one who initially reported the bug - I just confirmed it. > > - Thank you > > Jimmy
Awesome. Thank you for confirming! *** This bug has been marked as a duplicate of
bug 211503
***
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