Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty language select in iOS Safari on initial page load #233

Merged

Conversation

Wandmalfarbe
Copy link
Contributor

Dieser PR behebt einen Bug, den ich nur auf Safari für iOS nachstellen konnte. Beim initialen Laden der Seite war das Language-Select leer, obwohl dies etwas verzögert per JavaScript mit Inhalt gefüllt wird. Diese nachträgliche State-Änderung hat Safari erstmal nicht angezeigt, bzw. sie wurde angezeigt, wenn man das Select angeklickt/angetippt hat.

Der Workaround klont einfach das komplette Select aus dem HTML, entfernt das ursprüngliche Select und arbeitet auf dem Klon. Dann funktioniert auch alles im Safari auf iOS. Den Fehler konnte ich nicht mit Safari für macOS oder auch Firefox für macOS nachstellen.


This PR fixes a bug I was only able to replicate on Safari for iOS. When the page was initially loaded, the language select was empty, although this was filled with content via JavaScript with some delay. Safari did not display this subsequent state change at first, or it was displayed when you clicked/tapped on the select.

The workaround is simply cloning the entire select from the HTML, removing the original select and working on the clone. Then everything works in Safari for iOS. I could not reproduce the error with Safari for macOS or Firefox for macOS.

Before After
before fix safari ios wont update state of select after fix

@dbambus
Copy link
Collaborator

dbambus commented Apr 18, 2023

Hallo @Wandmalfarbe,

sehr mysteriös, dass man das so löst. Aber vielen Dank für den Pull request ;-).

Mit freundlichen Grüßen

@dbambus dbambus merged commit 49ca3d4 into ESPWortuhr:main Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants