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.
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"