Skip to content

MobileView fails if the HTML isn't available #1

Description

@liquidlightuk

If the HTML element isn't available (which, by default, is `mobileNavigation ) then the JavaScript fails and throws an error

If the element isn't available, it should fallback to a default with (~715) or check the mobile agent.

E.g.

document.querySelector(selector).length ? document.querySelector(selector).offsetParent !== null : isMobileAgent()

However, as the check is for the visibility of an element which is done on width, maybe it should fallback to screen width instead?

Identified when using the JS with Playwright and not having the .mobileNavigation element

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions