Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SubMenu appears at incorrect position #501

Open
pmccarenko opened this issue Feb 5, 2024 · 1 comment
Open

SubMenu appears at incorrect position #501

pmccarenko opened this issue Feb 5, 2024 · 1 comment
Labels
bug upstream Issue in the CEF libraries

Comments

@pmccarenko
Copy link

Hi!

After adding SubMenu to standard menu, this menu appears at correct position only first time. But next time it always appears in the upper left corner of the screen. Please see the video below.

https://drive.google.com/file/d/1um1ygXjDvglYS9nvoTtEHAfSkI4MISzk/view?usp=drive_link

To Repeat this issue - add code to SimpleOSRBrowser project in Lazarus (on Video it Lazarus 3.1 with CEF4Delphi 121.3.2, but it present in any version of CEF4Delphi above 107.1.12; In Version 107.1.12 all works Ok):

procedure TForm1.chrmosrBeforeContextMenu(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
const params: ICefContextMenuParams; const model: ICefMenuModel);
const
MY_CONTEXTMENU_ASUBMENU = MENU_ID_USER_FIRST + 100;
MY_CONTEXTMENU_ASUBMENU_ITEM1 = MENU_ID_USER_FIRST + 200;
MY_CONTEXTMENU_ASUBMENU_ITEM2 = MENU_ID_USER_FIRST + 300;
var
aSubMenu: ICefMenuModel;
begin
aSubMenu:=model.AddSubMenu(MY_CONTEXTMENU_ASUBMENU,'Test Menu');
aSubMenu.AddItem(MY_CONTEXTMENU_ASUBMENU_ITEM1,'SubMenu 1');
aSubMenu.AddItem(MY_CONTEXTMENU_ASUBMENU_ITEM2,'SubMenu 2');
end;

@pmccarenko pmccarenko changed the title SubMenu shows at incorrect position SubMenu appears at incorrect position Feb 5, 2024
@salvadordf
Copy link
Owner

I can reproduce this issue with the official CEF sample application so I reported it to the CEF project.
chromiumembedded/cef#3640

@salvadordf salvadordf added bug upstream Issue in the CEF libraries labels Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug upstream Issue in the CEF libraries
Projects
None yet
Development

No branches or pull requests

2 participants