ni / nimble

The NI Nimble Design System
https://nimble.ni.dev
MIT License
29 stars 8 forks source link

Some touch interactions have a lag on mobile #1645

Open mollykreis opened 10 months ago

mollykreis commented 10 months ago

🐛 Bug Report

Some touch interactions have a lag on mobile. These include pressing the formatting buttons on the rich-text-editor and the +/- buttons on the number-field (just two examples, we should do a pass and find all the interactions with the 300ms delay issue on mobile).

💻 Repro or Code Sample

Go to storybook on mobile and view the number-field story. Notice the slight lag between pressing the +/- buttons and the value updating.

🤔 Expected Behavior

Pressing these buttons on mobile should be nearly instantaneous, as they are on a desktop browser.

😯 Current Behavior

There is a slight lag when pressing the buttons.

💁 Possible Solution

Use touch-action: manipulation to style these buttons (and any other that it makes sense on).

🔦 Context

🌍 Your Environment

Safari on iOS

fredvisser commented 6 months ago

@fredvisser - Add requirements and enumerate all of the nimble-buttons where we should add this property.

manipulation Enable panning and pinch zoom gestures, but disable additional non-standard gestures such as double-tap to zoom. Disabling double-tap to zoom removes the need for browsers to delay the generation of click events when the user taps the screen. This is an alias for "pan-x pan-y pinch-zoom" (which, for compatibility, is itself still valid).