1. HUNG CK
  2. PowerBuilder
  3. Tuesday, 30 January 2024 02:48 AM UTC

I try to code hybrid app using pB2022 R3 + webBrowser Control (webview2). Normally, it is a sheet window contains a webBrowser control, and the webBrowser navigate to my webapp.

It functions well within the webBrowser. however, when lost focus of the webBrowser (e.g. copy text from another place), and move back, the focus always move to first element of web page. It is very annoying when copy-and-paste text to the webpage in webBrowser.

How to get around, or fix the problem?

Please kindly help. thanks in advanced.

 

Regards,

CK

Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 31 January 2024 02:10 AM UTC
  2. PowerBuilder
  3. # 1

Hi CK,

How do you move back specifically? Please try executing java script in the getfocus event of WebBrowser control to set focus on the target object, for example:
wb_1.EvaluateJavascriptAsync("document.getElementById('myInput').focus()")

If there is still any issue, please open a support ticket in the support portal and please provide a test case & the detailed steps to reproduce it. Many thanks in advance.
https://www.appeon.com/standardsupport/

Regards,
Kai

Comment
  1. HUNG CK
  2. Wednesday, 31 January 2024 06:08 AM UTC
I have tried to save latest focus element, and resume focus when move back. However, this issue does not totally solved.



When I move to other program to copy text, and click on a element to paste it. the focus will move to other element than the "clicked" element. Very annoying, not like normal application, which shall focus on clicked object. If it is a program bug, I will open a support ticket.



Regards,

CK Hung
  1. Helpful
  1. Kai Zhao @Appeon
  2. Thursday, 1 February 2024 00:07 AM UTC
Please report the PB issues via our standard support ticketing system to ensure it is being properly received and tracked by our tech support:

https://www.appeon.com/standardsupport/. Many thanks in advance.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.