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

Edit YAML still broken on iOS with code mirror 6 (copy, paste, replace issues) #8542

Closed
3 tasks done
hagenuck1 opened this issue Mar 4, 2021 · 10 comments · Fixed by #8992
Closed
3 tasks done

Edit YAML still broken on iOS with code mirror 6 (copy, paste, replace issues) #8542

hagenuck1 opened this issue Mar 4, 2021 · 10 comments · Fixed by #8992
Labels
Bug Current Bug in UI - Extra Attention

Comments

@hagenuck1
Copy link

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.

Describe the issue you are experiencing

Copy and paste still has some issues with code mirror 6 on iOS (tested in safari & Home Assistant App).
Issues in Script Editor > Actions > Edit in Yaml:

  • Double tapping a word and "cut" it cuts the whole line
    -- Pasting it pasts the whole line
  • Double tap a word and clicking the "delete" button on keyboard deletes only one letter at the position you double tapped
  • mark multiple lines, cut them and paste them only cuts/ pasts the last line

YAML Editors on Lovelace cards have the same issues as with code mirror 5.

Deleted "all website data" in Settings > Safari > Website Data (Did not delete my whole history).

Describe the behavior you expected

Boeing able to copy, paste and replace like the demo on www.codemirror.net/6

Steps to reproduce the issue

  1. Open a new script in the editor and select "Edit in YAML" for the action
  2. Try to cut/copy a single word or multiple lines or mark one word to delete it
  3. Try to edit yaml of a Lovelace card
    ...

What version of Home Assistant Core has the issue?

2021.3.0

What was the last working version of Home Assistant Core?

In which browser are you experiencing the issue with?

iOS 14.4 Safari

Which operating system are you using to run this browser?

iOS 14.4

State of relevant entities

# Paste your state here.

Problem-relevant frontend configuration

# Paste your YAML here.

Javascript errors shown in your browser console/inspector

# Paste your logs here.

Issue #8534 should have been fixed by pull request #8382

@hagenuck1 hagenuck1 added the Bug Current Bug in UI - Extra Attention label Mar 4, 2021
@bramkragten
Copy link
Member

If you see the exact same behavior as with the previous version, and the demo of codemirror 6 works, I would say your cache is not cleared correctly?

@hagenuck1
Copy link
Author

I deleted "All Website Data" as written, as I hoped to be able to preserve my history data.
I did a "Delete all History and data" for safari now.
Re logged in, but the same behavior is still present.
Restarted the iPhone > Same issue
User Safari private Tab > Same issue
Deleted "Frontend Cache" in Home assistant app > Same issue

So I think the cache should not be the issue.

@bramkragten
Copy link
Member

codemirror/dev#414

@hagenuck1
Copy link
Author

image

codemirror/dev#414

@aptonline
Copy link

I’m seeing the same issue on iOS. Used ‘Reset Frontend Cache’ within home assistant app and still unable to select, copy, paste consistently where as the Codemirror 6 demo (https://codemirror.net/6/) works perfectly.

@aptonline
Copy link

aptonline commented Mar 5, 2021

Issues still present in 2021.3.1.

Also in latest version a horizontal white selection is seen before selecting anything which isn’t an issue in non dark mode themes but light themes obscure the selection text.

EDIT: I see the active line issue in dark mode is now fixed: #8556

@hagenuck1
Copy link
Author

I've just seen, that you implemented codemirror/view release 0.18.0 and I only guessed it was codemirror/codemirror.next, as "better mobile support" was mentioned.
Sorry for that.

As the current codemirror 5 version isn't working fine on mobile I guess we'll wait for codemirror.next to be in a stable state and integrated in home assistant for this to be fixed.

@bramkragten
Copy link
Member

We do use codemirror/next

@dentra
Copy link

dentra commented Apr 14, 2021

I have the same issue on iOS (MobileApp, Mobile Safari, Mobile Chrome) and it is always reproducible. Can paste only on top of edit area no matter where cursor is. Can't delete any symbol at any position, only when I select something and write a letter it replaces the selection and after that cursor is immediately moving at top left position. Now the yaml editor is fully unusable in IOS :(

I've checked Codemirror 6 demo too and it is works fine.

@bramkragten
Copy link
Member

I updated the upstream issue with a repo.
codemirror/dev#414 (comment)

@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Current Bug in UI - Extra Attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants