Bug 375314

Summary: "Toggle HTML Display Mode" button does not work with HTML enabled by default
Product: [Applications] kmail2 Reporter: Matthijs <mtijink.bugs>
Component: commands and actionsAssignee: kdepim bugs <kdepim-bugs>
Status: CONFIRMED ---    
Severity: normal CC: jsardid, null
Priority: NOR    
Version: 5.4.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Matthijs 2017-01-19 20:00:23 UTC
I set KMail to display HTML email by default. This works fine, but since switching to a dark colorscheme, some e-mails are a bit problematic.

So I added the "Toggle HTML Display Mode" button to my toolbar, but it does not work: KMail shows the HTML email with the button either enabled or disabled. 

I tested the feature with HTML email disabled by default, and then it does work.
Comment 1 null 2020-04-09 15:15:46 UTC
I can reproduce this bug with KMail 5.9.2 (Qt 5.11.2 / KF 5.51) as well as KMail 5.14.40 (Qt 5.14.1 / KF 5.69), i.e. if "Prefer HTML" is turned on globally, activating the toggle HTML action to temporarily switch to plain text does nothing.

This is regardless of whether I use the toolbar action, a shortcut or by clicking on the HTML status bar itself.

FWIW, sometimes the following message is logged after every click on the HTML status bar, although I'm not sure whether this is related at all:
WebEnginePage::javaScriptConsoleMessage lineNumber:  19  message:  "Uncaught TypeError: Cannot read property 'compareDocumentPosition' of null"