appflowy-editor icon indicating copy to clipboard operation
appflowy-editor copied to clipboard

[Bug] How can I not trigger the keyboard popup when long pressing to make a selection in edit mode?

Open q200892907 opened this issue 2 years ago • 3 comments

Bug Description

How can I not trigger the keyboard popup when long pressing to make a selection in edit mode?

How to Reproduce

long pressing editor

Expected Behavior

Can control whether to evoke the keyboard

Operating System

mobile

AppFlowy Editor Version(s)

master

Screenshots

No response

Additional Context

No response

q200892907 avatar Oct 30 '23 03:10 q200892907

Is it possible to provide a control to invoke the keyboard? In some scenarios, you may not want to invoke the keyboard.

q200892907 avatar Oct 30 '23 03:10 q200892907

As of now, the keyboard service will be attached if the selection changes. If you need to control the keyboard behavior, then I have to add a new value to control it.

There's a flag called 'selectionExtraInfoDoNotAttachTextService'; you can set it to 'true' to disable the automatic attachment behavior.

editorState
        .selectionExtraInfo[selectionExtraInfoDoNotAttachTextService] = true;

LucasXu0 avatar Nov 06 '23 07:11 LucasXu0

As of now, the keyboard service will be attached if the selection changes. If you need to control the keyboard behavior, then I have to add a new value to control it.

There's a flag called 'selectionExtraInfoDoNotAttachTextService'; you can set it to 'true' to disable the automatic attachment behavior.

editorState
        .selectionExtraInfo[selectionExtraInfoDoNotAttachTextService] = true;

@LucasXu0 After I set this up, the keyboard still pops up

q200892907 avatar Nov 15 '23 03:11 q200892907