Bug 236756 - [GTK] Reply to specific message causes text and cursor disappear
Summary: [GTK] Reply to specific message causes text and cursor disappear
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-16 23:46 PST by Milan Crha
Modified: 2022-02-18 07:18 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Crha 2022-02-16 23:46:39 PST
Moving this from a downstream bug report:
https://gitlab.gnome.org/GNOME/evolution/-/issues/1804

This is a very weird behavior, which I cannot reproduce outside of Evolution [1]. From the [2]:

This [3] is a simple test email. Enough to:

* make sure "Edit->Preferences->Composer Preferences->Format as HTML" is unchecked
* make sure in "Edit->Preferences->Mail Preferences->HTML Messages" is set to not load remote content
* import the message
* reply to the message and chose to lose formatting

Actual outcome:
The message text, neither the cursor, is drawn. Trying to change the text color in the web inspector makes no change, neither switching to HTML format and changing the color with the toolbar items. Modifying the background color in the inspector makes the background change, but the text is still not drawn (neither the cursor). The inspector itself shows the colors properly, in the CSS and computed CSS at least. The text is also there, which can be confirmed by Ctrl+A and copy it to an external text editor.

The problem in the message is this part:
    <style type="text/css">
	@import url(https://www.example.com/file.css);
    </style>
when I remove the line with the @import, all works as expected.

The referenced file does not exist and Evolution prevents loading it anyway, thus it should not influence anything in the document. The problem begins when the editor code removes the <style> element from the document during the conversion to plain text. When I keep the <style> there (even with the @import), it works fine.

It's reproducible with webkit2gtk3-2.34.5-1.fc35.x86_64 and evolution 3.42.x.

[1] https://gitlab.gnome.org/GNOME/evolution/-/issues/1804#note_1385450
[2] https://gitlab.gnome.org/GNOME/evolution/-/issues/1804#note_1385346
[3] https://gitlab.gnome.org/GNOME/evolution/uploads/5fd6cd01db1647b104ea5c504deddcba/eml.eml