iOS icon indicating copy to clipboard operation
iOS copied to clipboard

Can't copy/paste in Files Editor add-on in macOS app (Safari works fine)

Open SeanPM5 opened this issue 5 years ago • 46 comments

Device model, version and app version

Model Name: MBP macOS Version: 11.0 Beta (20A5384c) Big Sur Public Beta 9 App Version: 2020.7 (3) Safari Version: 14.0.1 (16610.2.6.1.6)

Home Assistant Core Version

0.116 dev

Describe the bug In the macOS app when using the Files Editor Supervisor add-on, you cannot copy and paste. Not by using keyboard shortcuts (cmd-c & cmd-v) and not by using the menu bar (Edit -> Copy). You can select the text and press the keyboard shortcuts or menu items, but it never appears to copy to the clipboard.

I tested it in Safari desktop browser version 14.0.1 (16610.2.6.1.6) on macOS Big Sur public beta 9 and it worked as expected there, so it's just the app.

This is a very popular add-on that people use to edit their configuration via the browser. I suspect it's doing some user agent sniffing and treating the macOS app as a mobile device. So it's arguably more of an issue in the add-on itself.

But this has been an issue with other add-ons previously like NodeRED (https://github.com/home-assistant/iOS/issues/1059) and I know the macOS app user agent was tweaked in the past, so maybe it could still use some more refining still, as these issues might be widespread(?).

To Reproduce

  1. Supervisor -> Add-On Store -> Files Editor -> Install.
  2. Use add-on to edit your configuration and try to copy/paste, it's impossible.

Expected behavior Copy and paste to work as expected.

Screenshots

Additional context

SeanPM5 avatar Oct 04 '20 22:10 SeanPM5

Same here with my setup:

Model Name: MacBook Pro 13', M1, 16GB Ram, (2020) macOS Version: Big Sur 11.1 App Version: 2021.1 (1)

Shwamp avatar Jan 02 '21 19:01 Shwamp

There seems to be a more generalized copy/paste problem. For example, if you select "Developer Tools" from the side-bar and poke around in the SERVICES, it doesn't seem to be possible to select and copy text from "Service Data" field. I've had similar problems with the Developer Tools/TEMPLATE tab, where the template editor fields doesn't appear to let you copy text there, either.

I'm using Firefox 85.0.2 (64-bit) on macOS 10.15.7 with version 2021.2.3 of the Home Assistant companion application.

lmamakos avatar Feb 15 '21 00:02 lmamakos

Yeah, in general copy/paste doesn't work consistently in the app (tested on iPhone and Mac).

This happens in all text area fields, not just in the Files Editor.

Example video: https://user-images.githubusercontent.com/5403662/111882486-43272e00-898c-11eb-80cc-04a615b84bea.mp4

Here I trying to copy/paste originally using the keyboard, I switched to right click when I realized nothing would be showing in the video.

JonLaliberte avatar Mar 20 '21 18:03 JonLaliberte

This issue was reported 5 months ago and it is still does not appear to be even under investigation by dev team. With this bug using the app is an exercise in frustration with every task eventually being aborted and completed in Safari. I really like the idea so keep coming back in the hope that the achilles heal will be addressed. I'm a dev-ops guy so if there is anything I can do to help the community then I have time on my hands.

maxlyth avatar Mar 24 '21 13:03 maxlyth

I'm sorry to do this, but pinging @zacwest

Not sure if this is a known issue, or something intrinsically difficult/out of your control to fix. It's something that is a constant problem when trying to edit Lovelace cards, automatons, and scripts - anywhere with a multi-line text field/textarea (for example YAML).

I believe it doesn't affect normal single line input fields (briefly tested just now).

I've noticed that when I copy from the HA app, in Pastebot the clipping Type is shown as "Clipping from Home Assistant" and it's unable to show a preview of it. I've only seen this happen in the HA app, all other apps show the copy as being text and I'm able to preview it.

2021-03-24_09-42-55

JonLaliberte avatar Mar 24 '21 13:03 JonLaliberte

I love the Mac OS companion app, it's so fast and fluid on my M1, but not being able to copy and paste is a massive problem.

fzsaj avatar Jun 17 '21 23:06 fzsaj

I love the Mac OS companion app, it's so fast and fluid on my M1, but not being able to copy and paste is a massive problem.

Update home assistant, it was fixed in a recent release.

JonLaliberte avatar Jun 17 '21 23:06 JonLaliberte

Thanks for the amazingly fast reply but I’m running 2021.6 (158) on Big Sur 11.4 so I’m up to date. Or am I? I just checked and there's a point update...

Best Alex

fzsaj avatar Jun 17 '21 23:06 fzsaj

Hmm. I haven't tested it on that combination yet, but I know on 2021.5 on iOS things were working very well. Are there specific fields you're having problems with? (BTW, I'm just a user, so I'm just curious and trying to help pull out more info in case it helps one of the devs)

JonLaliberte avatar Jun 18 '21 19:06 JonLaliberte

I can copy and paste in the Configuration pages, Scenes, Automations, Devices, Developer Tools and places where you use the entity filters, but the Script Editor, anywhere there's a YAML editor in fact, it's a no go. I pulled the HA point update last night, but still no dice. On iOS or on a Catelina 10.15 Mac, copy and paste works with 2021.6.5 but as I said, I'm on an M1 Mac Mini running the latest Big Sur 11.4.

fzsaj avatar Jun 18 '21 20:06 fzsaj

I'm having the same issue, but it seems intermittent.

Running HASS OS 6.3/Core 2021.9.4.

There are a few times Cut & Paste works, but usually doesn't. In addition, I cannot access logs within ESPHome—the in-window popup doesn't show, and it's only an issue within the HA app. I will create a separate issue for that one, and perhaps the odd red "flash" that happens regularly with UI elements when the main window is open. However I do think they're all connected.

At first I thought it may be related to content blocker extensions within Safari and disabled them for the URL. No change.

zang74 avatar Sep 09 '21 11:09 zang74

Has there been any traction with this?
I can't copy/paste any YAML data on the MacOS app v. 2021.216

MacOS Big Sur 11.4

Safari works fine, its just the desktop app.

magnetic157 avatar Oct 14 '21 13:10 magnetic157

Still Broken... any workaround, please?

johngianni avatar Nov 08 '21 08:11 johngianni

It's one of the main reasons I still primarily access HA from a generated Fluid app (https://fluidapp.com). Even though both are theoretically using the same Webkit engine, the HA app suffers from this problem and Safari doesn't. The disadvantage is not having all the sensors and notification abilities. It's frustrating.

zang74 avatar Nov 08 '21 16:11 zang74

Same for me, copy/paste doesn't work most of the time, and when it work it's one shot and paste at the wrong place.

And recently when paste work, it copy 2x my text. On iOS, iPad and mac app.

Strangehadron avatar Nov 17 '21 20:11 Strangehadron

Copy and Paste doesn't work in YAML editors on my iPhone or my Macbook Pro M1 using the app. I had to uninstall it on my Macbook through sheer frustration of being half way through automations and not being able to paste.

ark- avatar Dec 09 '21 08:12 ark-

This is a very annoying issue! Especially if you cut something that hasn't been saved that you're working on, and poof! It's gone! but I need the app running for sensors.

r14n avatar Jul 05 '22 16:07 r14n

Home assistant 2022.7.6: Same issue here: cannot copy/past in Safari on OSX.

But it does work in Chrome. So that's a workaround.

jacopsd avatar Jul 25 '22 08:07 jacopsd

Still not fixed.. This is really an issue :(

h0jeZvgoxFepBQ2C avatar Sep 05 '22 09:09 h0jeZvgoxFepBQ2C

Any updates on this?

Seems many people are suffering from this issue.

segdy avatar Jan 31 '23 04:01 segdy

The only real path forward here is going to be converting the app from a Catalyst (iPad-on-Mac) app to a native Mac app. It's probably the next major project I take on in the app, but it's going to be a lot of work -- effectively rewriting the app on all 3 platforms (Mac, iOS, Watch). I believe it'll make the app behave like Safari in all cases, which will fix these issues which stem from the quasi-iOS version of the WebView we are forced to use.

zacwest avatar Jan 31 '23 04:01 zacwest

That's pretty crazy that a massive refactor is needed. Are there other bonuses to the "native" apps?

I must admit I've taken to just using safari on my laptop instead of the app and in general just gave up editing any yaml/automations on my phone.

ark- avatar Jan 31 '23 09:01 ark-

Maybe it's also good to take into consideration to reduce the MacOs app to a deamon running in the background to just report the events, etc. And use a working browser for the frontend. Might save a lot of trouble and frustration.

kaandorp avatar Mar 01 '23 15:03 kaandorp

This is essentially how it use it now. If the macOS app could add in some other platform interfaces (like being able to run a shell script so I could put the mac to sleep, etc.) that'd be fine. Maybe expose those as button entities to Home Assistant..

lmamakos avatar Mar 01 '23 21:03 lmamakos

Found a workaround. Pinching 3 fingers together for copying and reverse it to paste. Works in Safari and the App on iOS, not sure about gestures on the Mac.

Sk1nk avatar May 04 '23 21:05 Sk1nk

Whoah incredible really works! Thanks! Very hackt but good for quick edits

segdy avatar May 04 '23 22:05 segdy

Any progress made on this?

dunxd avatar Oct 20 '23 13:10 dunxd

Reporting in in December 2023. Looks like we're headed to 2024 without copy & paste.

shi-vy avatar Dec 11 '23 09:12 shi-vy

and meanwhile I discovered so many more bugs with the app that it’s barely useable. Saddening.

on top: many times, when I tap on an entity to see details, it just reloads the entire page instead of showing the details.

segdy avatar Dec 11 '23 09:12 segdy

it is still not fixed in 2024 ;-)

gorcsev71 avatar Jan 13 '24 21:01 gorcsev71