Share via

MSHTML editor bug regarding images

Greg Wittmeyer 1 Reputation point
2022-02-21T19:40:02.45+00:00

My app hosts an MSHTML based editor for composing emails. I've recently noticed a problem with the resizing of images. When the user clicks on one of the eight grapples (or grippers or whatever they're called) and drags it with the intent of resizing the image, it does not work properly at all. The grapple does not move correctly with the mouse, it is moving much less than it should. Once completed, the <img> tag is left in an odd state:

<img width="15" height="11" style="width: 23px; height: 7px;" src=...

Notice the dimensions do not match. I'm on a 4K monitor with DPI set to 250%. Lowering the resolution from 3840x2160 to 1920x1080 and the DPI from 250% to 100% makes the problem go away. It seems like this is a bug/deficiency in MSHTML.

Windows development | Windows API - Win32

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.