react-mentions icon indicating copy to clipboard operation
react-mentions copied to clipboard

Mentions dropdown shifting on iOS with react Portal

Open Tirlipinpin opened this issue 3 years ago • 4 comments

Hello there,

I'm currently using react-mentions to implement a messenger-like system and I'm facing a weird issue on iOS whenever I try to use React portals. For some reason, the mentions dropdown shifts when I'm trying to mention a user (this seems to be related to the iOS keyboard).

See screenshots for details:

PC behaviour image

iOS behaviour IMG_2891

Here's a link to the code behind: https://codesandbox.io/s/fragrant-leftpad-cx4ci.

Do you know how I may fix this? Is this an issue on my end?

Thanks

Tirlipinpin avatar Dec 09 '21 09:12 Tirlipinpin

Bump. I see a lot of iOS issues not being reported.

Joroze avatar Jan 13 '22 12:01 Joroze

Was able to fix this by forcing overflow:visible on the mentions control, YMMV. Note that I had to remove the suggestionsPortalHost for this to work, hopefully it helps.

.mentions--singleLine{
    overflow: visible !important;
}

jmverastigue avatar Mar 30 '22 00:03 jmverastigue

@jmverastigue suggestion's worked for me, thanks

luantrasel avatar Jul 20 '22 14:07 luantrasel

Finally had the occasion to try it out and I couldn't make it work... I tried removing suggestionsPortalHost as mentioned by @jmverastigue however I don't have the .mentions--singleLine class in my code. I seem to be missing something but I just don't get what.

Tirlipinpin avatar Sep 08 '22 07:09 Tirlipinpin