Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

<select> in PWA doesn't fire on Android #609

Open
@erbarratt

Description

Select that fire correctly in Chrome on Android, don't fire when in the PWA of that same site.

FastClick is the only plugin, everything else is vanilla JS.

It only doesn't fire on select's that ALSO have an eventListener attached to them (usually change) OR that are checked inside the the eventListener of another element.

For example, I have a "Country" select with option val=0 being "Please Select". The submit button for that form checks to see if that select's val is still 0, and if so marks it with some CSS. Inside a PWA, this select box doesn't open.

If I duplicate the same form but remove the click eventListener on the submit button, the select DOES fire.

This is all bypassed by "needsclick" class, but I found it interesting there was this distinction.

Now, for every page before calling FastClick, I run:

let selects = document.querySelectorAll('select');
for(let i = 0; i < selects.length; i++){
	selects[i].classList.add('needsclick');
}

Metadata

Assignees

No one assigned

    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