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

SuppressesLongPressGesture / Suppresses3DTouchGesture preferences not working since iOS 15.1 #1216

Open
3 tasks done
steodor opened this issue Jan 17, 2022 · 5 comments
Open
3 tasks done
Milestone

Comments

@steodor
Copy link

steodor commented Jan 17, 2022

Bug Report

First of all thank you for your time! ❤️

Problem

SuppressesLongPressGesture / Suppresses3DTouchGesture preferences not working since iOS 15.1

What is expected to happen?

The CSS rule user-select: none; is expected to work as designed. On iOS 14.x it does work, disabling the native text selection magnifier on the specified elements, as intended.

What does actually happen?

On iOS 15.1 the CSS rule above is ignored again, so the magnifier pops up.

Information

We tried attaching both touchend and click events to the relevant elements (and more, just to make sure), to no avail.

Our app had this issue initially (a few years back), then we applied Eddy Verbruggen's fix successfully. Then the plugin got integrated into Cordova as the 2 mentioned preferences. We applied those and it worked beautifully, and still works on all iOS versions up to and including 14.x. iOS 15 seems to have broken it again.

Command or Code

  1. Set either one or both preferences (same result regardless) to config.xml in the iOS section:
<preference name="SuppressesLongPressGesture" value="true" />
<preference name="Suppresses3DTouchGesture" value="true" />
  1. We have the following CSS (scss below), a bit verbose but does the job:
body,
* {
    -webkit-touch-callout: none;
    -webkit-user-callout: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-modify: none;
    -webkit-highlight: none;
    -webkit-text-size-adjust: none;
    -moz-user-select: none;
    user-select: none;
}

input,
textarea {
    -moz-user-select: text;
    -webkit-user-select: text;
    user-select: text;
}
  1. Long press empty space or any other element than input/textarea. Magnifier pops up although it shouldn't. iOS 15 only, earlier versions behave normally.

Environment, Platform, Device

iOS 15.1 (and higher, i imagine)

Version information

cordova v.11.0.0
cordova-ios v6.2.0
cordova-cli v1.0.0
...the rest i imagine is irrelevant since the exact same app works perfectly on an iOS 14 device and fails on iOS 15.

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Thanks again! ❤️

@breautek breautek transferred this issue from apache/cordova Jan 17, 2022
@dpogue
Copy link
Member

dpogue commented Jan 17, 2022

This may have been fixed in upstream WebKit here, but not made it into an iOS release yet

@steodor
Copy link
Author

steodor commented Jan 18, 2022

Great find @dpogue, thank you! I guess we'll just wait until either there's enough activity here to attempt an external fix (again), or until that fix gets into iOS, whichever comes first.

@dpogue
Copy link
Member

dpogue commented Jun 5, 2023

@steodor Are you able to confirm if this is still an issue in iOS 16.5?

@steodor
Copy link
Author

steodor commented Jun 9, 2023

Hi @dpogue , i can confirm it's still an issue in iOS 16.3.1. Don't know about 16.5 yet.

@tol-uno
Copy link

tol-uno commented Jun 11, 2024

This is still an unresolved issue on iOS 17.4.1

Here is a link to the current SuppressesLongPressGesture / Suppresses3DTouchGesture code

@dpogue dpogue added this to the 8.0.0 milestone Aug 15, 2024
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

No branches or pull requests

3 participants