1

Topic: IWebBrowser2 And <div>

Good evening.  on the basis of IWebBrowser2 does not want to process pushing enter in <div contenteditable = "true"> </div> though in <textarea> </textarea> all works normally. Thus in most IExplore and div and textarea work correctly... Prompt, please, in what side to dig? Thankful in advance. Alexander

2

Re: IWebBrowser2 And <div>

Found similar "bug", but without the answer... https://social.msdn.microsoft.com/Forum … m=vcmfcatl

3

Re: IWebBrowser2 And <div>

Hello, nikinikiniki, you wrote: N> Kontrol on the basis of IWebBrowser2 does not want to process pushing enter in <div contenteditable = "true"> </div> though in <textarea> </textarea> all works normally. N> thus in most IExplore and div and textarea work correctly... N> Prompt, please, in what side to dig? IE created through COM object IWebBrowser by default emulates version IE 7.0. What to get support of newer versions - it is necessary  with the register, the problem is old as the world the Author:  Date: 11.05.13

4

Re: IWebBrowser2 And <div>

Hello, Evgeniy Skvortsov, you wrote: ES> IE created through COM object IWebBrowser by default emulates version IE 7.0. What to get support of newer versions - it is necessary  with the register, the problem is old as the world the Author:  Date: 11.05.13 With the register already , as a result through <script type = "text/javascript"> var version = navigator.appVersion; alert (version); </script> received: 5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/7.0) and was: 4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/7.0;.NET4.0C;.NET4.0E; InfoPath.3) but all the same does not work PS - probably here put in Windows 10 - I will try to check up on Windows 7

5

Re: IWebBrowser2 And <div>

After numerous tests - all the same it is impossible to force Enter to work inside <div> a node... Thus, Spy ++ shows that messages WM_KEYDOWN/VK_RETURN come to browser to a window Clung to PreTranslateMessage, and in an explicit form to call TranslateAccelerator. For <textarea> all  - I receive 5 new lines, and for <div> - happens nothing BOOL CMFCApplication5Dlg:: PreTranslateMessage (MSG* pMsg) {if (pMsg-> message == WM_KEYDOWN) {if (pMsg-> wParam == VK_RETURN) {IUnknown* pUnk; IOleInPlaceActiveObject * pOle;//web is class CExplorer: public CWnd//it is created by a wizard on the basis of ActiveX "Microsoft Web Browser" pUnk = web. GetControlUnknown (); pUnk-> QueryInterface (IID_IOleInPlaceActiveObject, (LPVOID *) &pOle); for (int i = 0; i <5; ++ i) pOle-> TranslateAccelerator (pMsg);//pOle-> Release ();//return TRUE;//Do not process further}} return CDialogEx:: PreTranslateMessage (pMsg);}

6

Re: IWebBrowser2 And <div>

Hello, nikinikiniki, you wrote: N> does not want to process pushing enter in <div contenteditable = "true"> </div> though in <textarea> </textarea> all works normally. Also should not for not clearly what to do with that enter in <div>. Try so: <div contenteditable> <p> </p> </div>

7

Re: IWebBrowser2 And <div>

Hello, c-smile, you wrote: CS> Also should not for not clearly what to do with that enter in <div>. Strange, but standalone iexplore.exe copes such <div> and interposes <p> nodes at pushing VK_RETURN CS> Try so: CS> CS> <div contenteditable> <p> </p> </div> CS> So too tried - all the same does not react on VK_RETURN. Probably it is necessary to add  the handler on VK_RETURN and to read/edit leaking html that delivers a few a pain

8

Re: IWebBrowser2 And <div>

Probably not on  I created webbrowser  (where I was mistaken - yet did not find). Here this project https://github.com/cztomczak/phpdesktop … sktop-msie creates embedded a window with the correct adjustments and enter works in <div> as expected

9

Re: IWebBrowser2 And <div>

Hello, nikinikiniki, you wrote: For a long time it was... It Can here helps. It too output agent PreTranslateMessage, only at IDocHostUIHandler: IWebBrowser2 in designer mode the Author: RonWilson Date: 23.05.12 Nikolay