Location of html elements in a pane is not correct

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Location of html elements in a pane is not correct

Postby mkoubaa » Tue Jan 06, 2015 2:40 pm

Hi,

I embedded a CEF browser into my windows application. The application has several 'panes', a tree, a chart, a graph, and a browser. There are arranged as tiles and can be resized.

Assume the application has 4 quadrants and the browser portion is the top right pane. At the top left pane is the tree.

I loaded an html page into the browser 'pane' and I have an html 'select' element. The element is at the left edge of the browser pane.

When I click on the element, the "options" dropdown shows up at the left edge of the tree pane. It looks like some html elements are using the browser window rectangle and others are using the application window rectangle.

Any idea what the issue could be?
mkoubaa
Techie
 
Posts: 24
Joined: Mon Dec 29, 2014 4:28 pm

Re: Location of html elements in a pane is not correct

Postby magreenblatt » Tue Jan 06, 2015 9:42 pm

What CEF version? Are you using windowed or off-screen rendering for the browser?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Location of html elements in a pane is not correct

Postby mkoubaa » Wed Jan 07, 2015 11:33 am

Windows 64-bit Version 2171.1949. Windowed Rendering
mkoubaa
Techie
 
Posts: 24
Joined: Mon Dec 29, 2014 4:28 pm

Re: Location of html elements in a pane is not correct

Postby chrism » Mon Jan 12, 2015 4:59 am

The problem can be reproduced using the cefclient application (see below).

The placement is incorrect after the window has been moved. Resizing the window fixes the placement.

cefSelect.png
Screen shot showing incorrect placement of <select> drop down.
cefSelect.png (34.71 KiB) Viewed 6799 times
chrism
Newbie
 
Posts: 2
Joined: Mon Jan 12, 2015 4:47 am

Re: Location of html elements in a pane is not correct

Postby magreenblatt » Mon Jan 12, 2015 11:00 am

chrism wrote:The placement is incorrect after the window has been moved. Resizing the window fixes the placement.

What CEF verison are you using? A similar problem was fixed in https://code.google.com/p/chromiumembed ... il?id=1208.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Location of html elements in a pane is not correct

Postby chrism » Mon Jan 12, 2015 11:59 am

Chromium Embedded Framework (CEF) Standard Binary Distribution for Windows
-------------------------------------------------------------------------------

Date: June 11, 2014

CEF Version: 3.1750.1738
CEF URL: http://chromiumembedded.googlecode.com/ ... /cef3@1738

Chromium Verison: 33.0.1750.170
Chromium URL: http://chromiumembedded.googlecode.com/ ... /cef3@1738
chrism
Newbie
 
Posts: 2
Joined: Mon Jan 12, 2015 4:47 am

Re: Location of html elements in a pane is not correct

Postby magreenblatt » Mon Jan 12, 2015 12:08 pm

chrism wrote:CEF Version: 3.1750.1738

So your problem is likely already fixed in issue 1208. You can get 2171 branch builds from http://cefbuilds.com.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Location of html elements in a pane is not correct

Postby mkoubaa » Tue Jan 13, 2015 4:52 pm

When I move the cefclient I don't see this issue, but in my application I am still seeing it. We're using some third party code to manage the layout of the application - CodeJock Xtreme docking pane - http://www.codejock.com/products/dockin ... n6s14z=zsp

I'll need to figure out how to pick up on the WM_MOVE/WM_MOVING and call CefBrowserHost::NotifyMoveOrResizeStarted()

any advice is appreciated
mkoubaa
Techie
 
Posts: 24
Joined: Mon Dec 29, 2014 4:28 pm

Re: Location of html elements in a pane is not correct

Postby mkoubaa » Tue Jan 13, 2015 6:24 pm

Spy++ helped me find the right handler. For those interested, it is WM_WINDOWPOSCHANGED
mkoubaa
Techie
 
Posts: 24
Joined: Mon Dec 29, 2014 4:28 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 59 guests