Opened 10 years ago
Closed 5 years ago
#29385 closed defect (bug) (wontfix)
wpview: selecting all the content with ctrl/cmd + A when there's a view on top doesn't work
Reported by: | iseulde | Owned by: | iseulde |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | trivial | Version: | 4.0 |
Component: | TinyMCE | Keywords: | has-patch |
Focuses: | javascript | Cc: |
Description
Attachments (1)
Change History (9)
#2
@
10 years ago
- Summary changed from wpview: selecting all the content with ctrl/cmd + A when there are views doesn't work to wpview: selecting all the content with ctrl/cmd + A when there's a view on top doesn't work
This ticket was mentioned in Slack in #core-editor by iseulde. View the logs.
8 years ago
Note: See
TracTickets for help on using
tickets.
The problem: event.element from the NodeChange event always gives the first element in the editor if everything is selected. If the first element is a view however, we detect that the view is not properly selected and set the cursor before the view. We could limit this to only collapsed ranges, since the chance of having a lost uncollapsed range inside a view is extremely rare.
Another issue with views at the top or bottom of the editor is that they're not correctly removed when selecting everything and then hitting backspace. For me the last view was left, and the first view was broken and not visible. We could probably fix this by detecting a full selection and then correctly removing all the content on backspace or any other keypress that inserts some content.