Closed
Bug 687054
Opened 13 years ago
Closed 13 years ago
StorageEvent is not always fired
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: alexander.kovaleff, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0.1) Gecko/20100101 Firefox/5.0.1 Build ID: 20110707182747 Steps to reproduce: I have two separate browser windows. Each window listens to `storage` event. But `storage` event is not fired always. I expect `storage` event to be fired every time I change the value of `id` property in localStorage localStorage.setItem('id', uid); Each window has its own uid. But the `storage` event is triggred only twice. When the first window updates localStorage, and when the second window updates it for the first time. Firefox 5.0.1. Mac OS X. PS http://jsfiddle.net/alexanderk/sQXsu/show/ This is the demo page which illistrates this bug. Open two firefox windows with firebug. Start clicking on "Update local storage" in one window and another. You will see that `storage` event is fired only twice I have tested this page in Safari, Chrome, Opera -- everything works fine. Actual results: `storage` event was not triggered every time localStorage was modified Expected results: `storage` event is supposed to be triggered every time localStorage is modified
Reporter | ||
Comment 1•13 years ago
|
||
I worked around this problem by clearing value of key I'm updating before setting new value. localStorage.removeItem('key'); localStorage.setItem('key', uid); It looks like previous values are cached
Component: General → DOM
Product: Firefox → Core
QA Contact: general → general
Have you tried to see if the issue is reproducing on the latest firefox? http://www.mozilla.org/en-US/firefox/new/
Reporter | ||
Comment 3•13 years ago
|
||
no, I didn't.
Comment 6•13 years ago
|
||
I believe this has been fixed by bug 683316, because I could reproduce this on a build from Sept 22, but not on Sept 25.
Comment 7•13 years ago
|
||
Storage event is only fired if the value actually changes. I don't know if this is correct or not according to the spec. This is the behaviour I still see.
Comment 8•13 years ago
|
||
I can no longer reproduce the behaviour described in comment 0 (when once I could), so WFM.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•