Bug 453446 - localStorage.getItem() don't works properly when the file html is offline
Summary: localStorage.getItem() don't works properly when the file html is offline
Status: RESOLVED FIXED
Alias: None
Product: Falkon
Classification: Applications
Component: general (show other bugs)
Version: 3.2.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-06 01:18 UTC by Hervy Qurrotul Ainur Rozi
Modified: 2022-05-07 07:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
demo sidebar in falkon browser (3.24 MB, video/mp4)
2022-05-06 01:18 UTC, Hervy Qurrotul Ainur Rozi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hervy Qurrotul Ainur Rozi 2022-05-06 01:18:46 UTC
Created attachment 148594 [details]
demo sidebar in falkon browser

SUMMARY
I have a website rendered with mdBook-0.4.18 (static site generator for documentation). mdbook using
localStorage.getItem to store the item object and display the toc (table of contents) sidebar.

        <!-- Hide / unhide sidebar before it is displayed -->
        <script type="text/javascript">
            var html = document.querySelector('html');
            var sidebar = 'hidden';
            if (document.body.clientWidth >= 1080) {
                try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
                sidebar = sidebar || 'visible';
            }
            html.classList.remove('sidebar-visible');
            html.classList.add("sidebar-" + sidebar);
        </script>

The sidebar appearance is saved when uploaded to https (panduan.langitketujuh.id), but is not successfully saved when the website is opened offline. I don't know if this is because it doesn't support it in Falkon browser or from the mdbook side. I just wanted to report it. Thank you ^^

STEPS TO REPRODUCE
1. $ git clone https://gitlab.com/langitketujuh/l7-docs #or other mdbook site.
2. $ cd l7-docs/
3. $ mdbook build
4. open docs/html/index.html with falkon browser.
5. enable sidebar.
6. go to next page.
7. sidebar again closes. should still be open.

OBSERVED RESULT
-

EXPECTED RESULT
localStorage.getItem() works properly when the file is offline.

SOFTWARE/OS VERSIONS
Operating System: Void Linux
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
-
Comment 1 Hervy Qurrotul Ainur Rozi 2022-05-07 07:54:32 UTC
Solved by falkon 22.04.0