1

I have a native C++ app that authenticates a user using OAuth2 with various providers, which simply pops up a browser (IWebBrowser2) navigating to the target authentication server. Everything works well, but I have not been able to determine why the watermark in the textbox remains while typing.

enter image description here

I implement the following interfaces:
-- IOleClientSite
-- IOleInPlaceSite
-- IDocHostUIHandler
-- IOleInPlaceFrame
-- DWebBrowserEvents2

I was suspicious of IOleInPlaceFrame::TranslateAccelerator as well as IDocHostUIHandler::TranslateAccelerator, however these functions are not even called when the user is typing (breakpoints are never hit). Nevertheless, I have tried various return values to ensure that the browser is allowed to handle all input, however I have not been able to resolve the issue. Any help would be very appreciated.

EDIT: In addition, tab is not moving focus either, forcing the user to use the mouse to navigate. The 'x' on the right of the email functions properly when clicked.

Jeff
  • 2,495
  • 18
  • 38
  • 1
    Are you sure it's not caused by the page itself? or/and by what version of IE the page thinks it's talking to, check this out: https://weblog.west-wind.com/posts/2011/may/21/web-browser-control-specifying-the-ie-version – Simon Mourier Oct 25 '16 at 04:47
  • @SimonMourier - Outstanding article. You make a great point. Hoping this was the issue, I added my app to the list in HKLM with 11000 (dec), and rebooted just to be sure, however no change (sigh). I am running Win10 build 14393. Same behavior on Win7. Of course this doesn't happen when logging into something using only the standalone browser (i.e. logging into Office365). I still think that you may be right. – Jeff Oct 25 '16 at 13:03
  • Check the source code of the HTML. It is probably HTML5 placeholder if you only see the watermark in IE 10 or later. You can inject a text changed script for that input to remove the placeholder instead of dealing with TranslateAccelerator. – Sheng Jiang 蒋晟 Oct 30 '16 at 18:01

0 Answers0