Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

JS errors during execution can kill page accessibility #3648

Closed
@scottjehl

Description

@scottjehl

This one has always been a problem in my opinion, but it's an easy fix.

The problem is, we add this class to the HTML element when the framework begins executing, "ui-mobile-rendering", which globally sets all children of the HTML element to visibility:hidden while jQM progressively enhances everything. If the page was visible during this time, it'd make for an ugly FOUC, so this class just hides things until they're ready, at which point the class is removed and the page is shown.

Problem is, if anything goes wrong during enhancements-stage, like a runtime error for instance, that class will never be removed, meaning a blank screen. Not good at all.

I think we can add a pretty simple timeout to ensure the class is removed after 5 seconds, no matter what. The default removal will still be in place, so in all likelihood, it'll be removed much sooner than 5 seconds, but the timeout places a bit of a guarantee that it'll be removed if something goes wrong.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions