home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.13k stars 2.81k forks source link

Issue with Copying YAML Code from Home Assistant Desktop App #23085

Open shadigh92 opened 13 hours ago

shadigh92 commented 13 hours ago

Checklist

Describe the issue you are experiencing

When using the Home Assistant desktop app, I cannot copy YAML code from the interface. This issue does not occur when using the Home Assistant web interface, where copying works as expected.

Describe the behavior you expected

I expected to be able to copy YAML code from the desktop app just as seamlessly as I can from the web interface.

Steps to reproduce the issue

  1. Open the Home Assistant desktop app (specify OS:macOS).
  2. Navigate to a YAML editor or configuration page.
  3. Highlight a block of YAML code and attempt to copy it.
  4. Paste the copied content elsewhere (e.g., in a text editor) and observe that the operation fails.
  5. Perform the same steps in a browser with the Home Assistant web interface, where the issue does not occur.

What version of Home Assistant Core has the issue?

2024.11.3

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Google Chrome 131.0.6778.86

Which operating system are you using to run this browser?

Sequoia‏15.0 ‏(24A335‏)

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

karwosts commented 8 hours ago

I believe all mac apps are served by this repository: https://github.com/home-assistant/iOS/

This might be a better fit for there, the Apple desktop app isn't developed here.

SeanPM5 commented 3 hours ago

Not a frontend issue, it's an app issue since day one of the macOS app (see https://github.com/home-assistant/iOS/issues/1154).

Unfortunately it's a bug on Apple's side with Mac Catalyst web views (Catalyst is what allows iOS apps to run on Mac with minimal changes). Apple either has to fix this bug on their side, which they haven't for 4+ years now, or the Home Assistant app would have to be fully rewritten to be a native macOS app which is a huge undertaking and won't happen anytime soon.

A workaround you can do is open your Home Assistant URL in Safari, then click the share button in the top address bar and select the "Add to Dock" option. That'll make it feel more like an app with a dock icon and everything, and you'll be able to copy and paste since it's using Safari web view. And you can still run the Home Assistant mac app in "Menu Bar Only" mode for the sensors, notifications, actions in the menu bar item etc.