dify icon indicating copy to clipboard operation
dify copied to clipboard

[BUG] The Command Palette and the contextual menu does not show in iOS Safari

Open Emasoft opened this issue 1 year ago • 7 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. On iOS Safari open a Dify workflow
  2. Add or edit a code block
  3. Try to open the command palette holding the finger in the code editor

✔️ Expected Behavior

The Command Palette or the contextual menu should be displayed.

❌ Actual Behavior

Nothing is displayed except from the iOS contextual menu.

Emasoft avatar Oct 10 '24 00:10 Emasoft

The issue with the Command Palette and contextual menu not showing in iOS Safari might be related to platform-specific conditions in the code. The contextual menu implementation includes a check for iOS, which could be affecting its display:

const h = this._editor.getOption(126) && !S.isIOS;

This condition suggests that certain features might be disabled on iOS devices [1].

Additionally, ensure that touch event listeners like touchstart, touchend, and touchmove are correctly set up, as they handle touch interactions in the editor [1].

Review these conditions and event listeners to identify any potential issues specific to iOS Safari.

To continue talking to Dosu, mention @dosu.

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

It's rather complicate to edit a workflow on mobile, why do you want to use that in the mobile phone?

crazywoola avatar Oct 10 '24 03:10 crazywoola

It's rather complicated to edit a workflow on mobile, why do you want to use that on the mobile phone?

Because that is the very nature of your beautiful project! What good is automating jobs with AI if you cannot become free? At any time of the day (and of the night!), Defy is working for me. I don’t need to stay put anymore before a pc. I just need to be ready to react to the notifications from my phone, go on the Defy site, fix things, restart the workflow, and go back to my life. This is the difference that a project like Defy makes! 🤯🙀👀 Let me make this even more clear:

  • THE OLD WAY: you are forced to sit before your pc all the time you are doing your job.
  • THE DIFY WAY: you are free to do whatever you want and go anywhere you want. You just need to be ready at any time to receive a notification from Dify about a problem with your running job, use your mobile phone to quickly fix the issue, and let Defy resume the job right away.

Let me ask you a question: If you're in bed at night and you receive a notification from Dify, would you rather wake up, put on warm clothes, put on your shoes, walk to your studio, power on your desktop PC, and boot it up, OR just fix the problem with your phone in your hand right away in one minute without even getting out of bed?

Now do you understand why mobile is even MORE important than desktop for Dify? 🙌🙀💪🏻🤳🕺🏻🏃🏻‍♂️‍➡️🫵

Personally, I let Dify stay put at the desktop in my place, while I sip my beer in the garden, laying on a comfy lounger at the poolside, sunbathing and reading a webnovel on my iPhone! 😎

Emasoft avatar Oct 10 '24 06:10 Emasoft

Personally, I let Dify stay put at the desktop in my place, while I sip my beer in the garden, laying on a comfy lounger at the poolside, sunbathing and reading a webnovel on my iPhone! 😎

Cool. I need to talk to the PM to see the plan for making it look better in mobile phone.

crazywoola avatar Oct 10 '24 08:10 crazywoola

Hi, @Emasoft. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You reported a bug in iOS Safari where the Command Palette and contextual menu do not appear in a Dify workflow.
  • I suggested the issue might be due to platform-specific conditions in the code and recommended reviewing touch event listeners.
  • Crazywoola questioned the need for mobile functionality, but you emphasized its importance for flexibility and freedom.
  • Crazywoola acknowledged your point and mentioned discussing mobile improvements with the project manager.

Next Steps:

  • Please let us know if this issue is still relevant to the latest version of the Dify repository by commenting here.
  • If there is no further activity, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Nov 10 '24 16:11 dosubot[bot]

Sorry for the late answer. Yes, this is still relevant. Please implement this change. Thank you.

Emasoft avatar Jan 22 '25 03:01 Emasoft

@takatost, the user Emasoft has indicated that this issue is still relevant and has requested the implementation of the change. Could you please assist them with this? Thank you!

dosubot[bot] avatar Jan 22 '25 03:01 dosubot[bot]