Command execution difference: click item vs enter key on item in Quick Launch list
Posted: Wed Dec 13, 2023 3:01 pm
Hi Support,
Please shed some light on the following...
(some intro) I'm custom handing some commands, let's say "cmd.newDocHtml" for the sake of this question.
In my custom IUIX_CmdHandler implementation, for UIX_CmdNotify_Exec in OnNotify I'm calling the following 3 "code lines":
1. Register IUIX_EventMonitor
2. Call Original Handler -> this will bring up the "DlgNewDocFromWebPage" dialog.
3. Unregister IUIX_EventMonitor
My code does what's needed in IUIX_EventMonitor.OnEventMonitor for e.Visible for "DlgNewDocFromWebPage" (pTarget.ID).
The above all works as expected WHEN that command is executed via mouse click on the corresponding item in the "File-New Document-From Web Page" main menu.
Also, all works as expected if I initiate the command from the "Quick Launch" via mouse click:
However: if I hit the enter (/return) key on that item in the Quick Launch list, my IUIX_EventMonitor never gets the "DlgNewDocFromWebPage" for pTarget.ID. Actually my IUIX_EventMonitor.OnEventMonitor never gets called - as if it is not registered (but is!)
So, clicking vs enter-key works differently.
Why ?
p.s.
The above applies as described for other commands as well ...
-žarko
Please shed some light on the following...
(some intro) I'm custom handing some commands, let's say "cmd.newDocHtml" for the sake of this question.
In my custom IUIX_CmdHandler implementation, for UIX_CmdNotify_Exec in OnNotify I'm calling the following 3 "code lines":
1. Register IUIX_EventMonitor
2. Call Original Handler -> this will bring up the "DlgNewDocFromWebPage" dialog.
3. Unregister IUIX_EventMonitor
My code does what's needed in IUIX_EventMonitor.OnEventMonitor for e.Visible for "DlgNewDocFromWebPage" (pTarget.ID).
The above all works as expected WHEN that command is executed via mouse click on the corresponding item in the "File-New Document-From Web Page" main menu.
Also, all works as expected if I initiate the command from the "Quick Launch" via mouse click:
However: if I hit the enter (/return) key on that item in the Quick Launch list, my IUIX_EventMonitor never gets the "DlgNewDocFromWebPage" for pTarget.ID. Actually my IUIX_EventMonitor.OnEventMonitor never gets called - as if it is not registered (but is!)
So, clicking vs enter-key works differently.
Why ?
p.s.
The above applies as described for other commands as well ...
-žarko