Bug 232615 - [GTK] Delete with backspace does not remove all elements
Summary: [GTK] Delete with backspace does not remove all elements
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-02 02:54 PDT by Milan Crha
Modified: 2021-11-02 03:56 PDT (History)
2 users (show)

See Also:


Attachments
test HTML file (4.87 KB, text/html)
2021-11-02 02:54 PDT, Milan Crha
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Crha 2021-11-02 02:54:41 PDT
Created attachment 443076 [details]
test HTML file

Coming from a downstream bug report:
https://gitlab.gnome.org/GNOME/evolution/-/issues/1680

I'm using webkit2gtk3-2.34.0.

When deleting content, not every element can be deleted, which leads to broken structure.

Steps:
a) save the attached test file
b) open it in the MiniBrowser:

   $ /usr/libexec/webkit2gtk-4.0/MiniBrowser --editor-mode /tmp/evocp.html

c) place the cursor before the "last div", at the end of the email address
d) hold Backspace until all the text above the "last div" is deleted

Expected: Everything is deleted
Currently: some elements are left at the top

Alternative steps:
...
c) Atrl+A followed by Delete

The same outcome as before.

When I remove the "last div" from the HTML structure, it works as expected, everything can be deleted on the first shot.

==========================================

The upstream bug exhibits an interesting drawing issue too, see the screenshots there. I'm not able to reproduce that part in the MiniBrowser, even the HTML structure seems to be exactly the same.