OSR combobox drop down list location is wrong.

Issue #2902 resolved
Vladislav created an issue
  • What steps will reproduce the problem?
  1. Replace rect.x = rect.y = 0; to rect.x = rect.y = 20; in OsrWindowWin::GetViewRect().
  2. Build cefclient.
  3. Load any webpage with an html form combobox element into cefclient.
  4. Activate the combobox dropdown list.
  • What is the expected output? What do you see instead?

The combobox dropdown list should appear under the combobox. Instead, the popup is offset by 20 pixels.

  • What version of the product are you using? On what operating system?

CEF master branch, on WIndows 10 x64.

Comments (8)

  1. Marshall Greenblatt

    The OnPopupSize documentation says:

    |rect| contains the new location and size in view coordinates.

    View coordinates treat the upper-left corner of the view as (0,0). What you’re doing in your PR is changing the code to pass screen coordinates instead of view coordinates.

  2. Marshall Greenblatt

    I believe this issue should be closed as WontFix given the above explanation. Do you agree?

  3. Vladislav reporter

    What if GetViewRect returns (20, 20, 300, 200)? The upper-left corner of this rect in screen coordinates: (20, 20); in view coodinates: (0,0). I understand correctly? My PR translates a rectangle (pos) in screen coordinates that comes from Chromium into a rectangle in view coordinates.

  4. Log in to comment