Ionic-framework: bug: TapticEngine integration does not work with ion-picker

Created on 11 May 2020  路  4Comments  路  Source: ionic-team/ionic-framework

Bug Report

Ionic version:
[x] 5.1

Current behavior:
No taptic feedback is triggered. When selecting a value with ion-picker, during the swipe gesture there should be a "selection" feedback from the taptic engine.

I checked and triggering it manually via dev console (window.TapticEngine.selection()), which works. The issue seems to be that with Ionics' integration gestureSelectionStart() (hapticSelectionStart()) and gestureSelectionEnd() (hapticSelectionEnd()) are never called, which leads to gestureSelectionChanged() (hapticSelectionChanged()) not being effective.

Expected behavior:
Taptic feedback works when the corresponding cordova-plugin is installed. See for example the implementation of ion-reorder-group where it's working.

Steps to reproduce:
Use ion-picker in a cordova application with the cordova-plugin-taptic-engine installed which is running on a device which supports taptic feedback.

Related code:
https://github.com/ionic-team/ionic/blob/1fbdb2255e4ff7fccf22d9ccc12b7f9bb4c3a064/core/src/components/picker-column/picker-column.tsx#L193

https://github.com/ionic-team/ionic/blob/1fbdb2255e4ff7fccf22d9ccc12b7f9bb4c3a064/core/src/utils/haptic.ts#L37

https://github.com/ionic-team/ionic/blob/f0e4215f41fdf6979f28d09531b9e7959a505b83/core/src/components/reorder-group/reorder-group.tsx#L160

Other information:
I tested on an iPhone 11 Pro which has a taptic engine built in.

And I also noticed that there are two versions of the haptic util:

core/src/utils/native/haptic.ts

and

core/src/utils/haptic.ts

Ionic info:

Ionic:

   Ionic CLI                     : 6.8.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.1.0
   @angular-devkit/build-angular : 0.901.5
   @angular-devkit/schematics    : 9.1.5
   @angular/cli                  : 9.1.5
   @ionic/angular-toolkit        : 2.2.0

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 27 other plugins)

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   ios-deploy : 1.9.2
   ios-sim    : 8.0.2
   NodeJS     : v14.2.0 (/usr/local/bin/node)
   npm        : 6.14.5
   OS         : macOS Catalina
   Xcode      : Xcode 11.4.1 Build version 11E503a
core bug

All 4 comments

Thanks for the issue. Can you try the following dev build and let me know if it resolves the issue?

npm i @ionic/[email protected]

@liamdebeasi Thank you Liam, works perfectly with the dev-build :)

Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic/pull/21268, and a fix will be available in an upcoming release of Ionic Framework.

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexbainbridge picture alexbainbridge  路  3Comments

giammaleoni picture giammaleoni  路  3Comments

BilelKrichen picture BilelKrichen  路  3Comments

masimplo picture masimplo  路  3Comments

Macstyg picture Macstyg  路  3Comments