Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SeanPM5 opened this issue Oct 4, 2020 · 33 comments
Open

Comments

@SeanPM5
Copy link
Contributor

SeanPM5 commented Oct 4, 2020

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 (#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

@Shwamp
Copy link

Shwamp commented Jan 2, 2021

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)

@lmamakos
Copy link

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.

@JonLaliberte
Copy link

JonLaliberte commented Mar 20, 2021

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.

@maxlyth
Copy link

maxlyth commented Mar 24, 2021

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.

@JonLaliberte
Copy link

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

@fzsaj
Copy link

fzsaj commented Jun 17, 2021

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.

@JonLaliberte
Copy link

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.

@fzsaj
Copy link

fzsaj commented Jun 17, 2021

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

@JonLaliberte
Copy link

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)

@fzsaj
Copy link

fzsaj commented Jun 18, 2021

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.

@zang74
Copy link

zang74 commented Sep 9, 2021

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.

@magnetic157
Copy link

magnetic157 commented Oct 14, 2021

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.

@johngianni
Copy link

Still Broken... any workaround, please?

@zang74
Copy link

zang74 commented Nov 8, 2021

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.

@Strangehadron
Copy link

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.

@ark-
Copy link

ark- commented Dec 9, 2021

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.

@r14n
Copy link

r14n commented Jul 5, 2022

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.

@jacopsd
Copy link

jacopsd commented Jul 25, 2022

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.

@h0jeZvgoxFepBQ2C
Copy link

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

@segdy
Copy link

segdy commented Jan 31, 2023

Any updates on this?

Seems many people are suffering from this issue.

@zacwest
Copy link
Member

zacwest commented Jan 31, 2023

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.

@ark-
Copy link

ark- commented Jan 31, 2023

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.

@kaandorp
Copy link

kaandorp commented Mar 1, 2023

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.

@lmamakos
Copy link

lmamakos commented Mar 1, 2023

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..

@Sk1nk
Copy link

Sk1nk commented May 4, 2023

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.

@segdy
Copy link

segdy commented May 4, 2023

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

@dunxd
Copy link

dunxd commented Oct 20, 2023

Any progress made on this?

@shi-vy
Copy link

shi-vy commented Dec 11, 2023

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

@segdy
Copy link

segdy commented Dec 11, 2023

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.

@gorcsev71
Copy link

it is still not fixed in 2024 ;-)

@kcoffau
Copy link

kcoffau commented Mar 7, 2024

issue persists in HAOS 2024.3 / Companion 2024.2 (2024.561)

@m-b-m
Copy link

m-b-m commented May 31, 2024

This issue still persists in 2024.5.1, it's rather annoying.

@bgoncal
Copy link
Member

bgoncal commented May 31, 2024

Quick "update", the issue will persist until the Mac app becomes native instead of Mac Catalyst (which requires a lot of work as explained by Zac above, or Apple may fix the bug in catalyst).

I'm sending this message just so you know why this issue that looks "simple" is not fixed yet and unfortunately we don't have the bandwidth at the moment to rebuild the Mac app.

If there are any volunteers I'm happy to help getting started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests