react-native-autocomplete-dropdown icon indicating copy to clipboard operation
react-native-autocomplete-dropdown copied to clipboard

[BUG]: is not possible to use native copy paste on the component

Open doubleppereira opened this issue 1 year ago • 4 comments

Currently if I try to copy paste any content I can't use the native copy paste of the systems. IOS and I am assuming Android react on long press -> paste

Intended behaviour on long press that is supported on text inputs: Screenshot 2024-10-22 at 14 51 17

How can I achieve same behaviour?

doubleppereira avatar Oct 22 '24 13:10 doubleppereira

My assumption is because it's of this: https://github.com/onmotion/react-native-autocomplete-dropdown/blob/28838dbcbe6b0640540d403bfe5c8baa3e3db150/src/index.tsx#L503 which is preventing any pointer events I think I understand why you this but this will not allow the native context menu to allow to copy paste. What do you suggest I can try to help if needed. @onmotion

doubleppereira avatar Oct 23 '24 09:10 doubleppereira

We can create a patch for this. Here is the patch for the same, the issue is being resolved after using this. But i don't know why the library publisher has disabled pointer events for IOS any specific reasons @onmotion ?

react-native-autocomplete-dropdown+4.4.0.patch

swapnil20711 avatar Mar 06 '25 05:03 swapnil20711

Hi guys, as far as I remember without this the event will be propagated to the text input which we need to intercept and do differently if the field is not editable. Your point is valid, need to be checked if another workaround works best

onmotion avatar Mar 06 '25 06:03 onmotion

So we can just switch to auto there? I end up doing a workaround on my app to accomplish this. I end up using my own input to input data into auto complete component which is a bit sad to do this but was the quickest solution for me. would like to use this component without this workaround

doubleppereira avatar Mar 07 '25 14:03 doubleppereira