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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Survey not shown on mobile (iOS 15, iPhone < 8) #2032

Closed
ilsd opened this issue Mar 25, 2024 · 6 comments 路 Fixed by #2033
Closed

Survey not shown on mobile (iOS 15, iPhone < 8) #2032

ilsd opened this issue Mar 25, 2024 · 6 comments 路 Fixed by #2033
Assignees
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@ilsd
Copy link

ilsd commented Mar 25, 2024

Please use the 馃憤 reaction to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Issue

When sharing a survey created with Forms via a link (anonymous answers) users of mobile browsers (at least on iPhone7, iOS 15.8.2 ) do not see the survey at all.

Other users (e.g. Firefox on Desktop) see and are able to complete the survey (it just works).

Steps to replicate it:

  1. Open this link with a a mobile browser: https://cloud.lantschner.name/index.php/apps/forms/s/YmMTjH4YsPzbjKedEHTNAfAo
  2. See a screen w/o any form

IMG_7612

Sumary

All users of iPhone < 8 can not participate in any survey.

Seems the problem is the lookbehind, which is only supported starting iOS 16.4 (Lookbehind in JS regular expressions | Can I use... Support tables for HTML5, CSS3, etc 1)

TODO: It needs to be checked if the current regex can be rewritten without a lookbehind.

Discussion

https://help.nextcloud.com/t/forms-survey-not-shown-at-all-on-mobile-ios-if-shared-via-link/186261

May be related to

https://help.nextcloud.com/t/forms-nextcloud-app-gui-fehler/166702
sounds similar although, in their case, the user was obviously at least able to start the survey.

Context

Nextcloud version : Nextcloud Hub 7 (28.0.3)
Operating system and version: Debian 4.19.304-1
Apache or nginx version : Apache/2.4.38 (Debian)
PHP version: PHP 8.2.17

@ilsd ilsd added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Mar 25, 2024
@Chartman123
Copy link
Collaborator

@susnux following the investigation in the forum I think it comes from this line here: https://github.com/nextcloud/forms/blob/main/src%2Futils%2FRegularExpression.js#L30

Is there an easy fix for it? If not I think that we shouldn't set this on highest priority given that the devices only receive security fixes from Apple and all modern browsers support this code.

@susnux
Copy link
Collaborator

susnux commented Mar 26, 2024

I think we could use (?:^|[^\\])(?:\\\\)*\/ as a regex, it only matches for non escaped slashes, so for checking it works.

@Chartman123
Copy link
Collaborator

So you mean that in our case it doesn't matter if it also matches preceeding characters? If yes, fine for me. Should I create a PR for that or do you want to do it yourself?

@susnux
Copy link
Collaborator

susnux commented Mar 26, 2024

Yes we do not care, as we just use it for testing not sanitizing. If you want create a PR, happy to review :)

@wilddom
Copy link

wilddom commented May 12, 2024

This doesn't seem to be solved or maybe a different bug has been introduced. In any case, the form isn't shown on iOs<17. Forms 4.2.3 on Nextcloud 29.0.0.

@Chartman123
Copy link
Collaborator

@wilddom It's probably something new. Please open a new issue and fill out the template. Especially error logs from the browser console are important here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants