-
-
Notifications
You must be signed in to change notification settings - Fork 362
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
Comments
pmccarenko
changed the title
SubMenu shows at incorrect position
SubMenu appears at incorrect position
Feb 5, 2024
I can reproduce this issue with the official CEF sample application so I reported it to the CEF project. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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;
The text was updated successfully, but these errors were encountered: