Skip to content

Not working on mobile #6

@mcallistersean

Description

@mcallistersean

I noticed a problem with this component in combination with the react-portal-hoc. It seems that touch events are caught by react-portal-hoc which closes the menu before the click event handler on the menu item has a chance to fire.

Changing the portal invocation wrapping MentionMenu to not close on click fixes the behaviour on mobile devices. It obviously introduces other problems such as the menu not closing when the textarea loses focus.

export default portal({ clickToClose: false, escToClose: true })(MentionMenu);

I could try to fix this, but will probably also need to touch the portal-hoc code in order to do so.
That and the release of react 16 with the portal functionality makes me wonder if it is worth the effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions