dify icon indicating copy to clipboard operation
dify copied to clipboard

[BUG] It is impossible to select more than one word on iOS Safari when using the code editor

Open Emasoft opened this issue 1 year ago • 1 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

Dify version

0.9.1

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. Open Dify on iOS Safari.
  2. in a workflow add or modify a code block
  3. try to select more than one line of text

✔️ Expected Behavior

Dragging the fingers many lines of text should be selected as in the prompt editor in the LLM blocks.

❌ Actual Behavior

Only one word is being selected.

Emasoft avatar Oct 10 '24 00:10 Emasoft

The issue you're experiencing with selecting more than one word on iOS Safari might be related to how the code editor handles text selection events. The editor uses functions like getWordAtPosition to determine word boundaries, which could limit selection to a single word based on cursor position [1].

To address this, you might need to look into modifying the touch input handling or selection logic in the code editor to better support multi-word selection on iOS devices.

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Oct 10 '24 00:10 dosubot[bot]