Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

FindSession Next/Previous focuses the webbrowser Options
PS
Posted: Wednesday, May 8, 2019 10:27:07 AM
Rank: Advanced Member
Groups: Member

Joined: 10/24/2018
Posts: 55
We have made custom search functionality which is basically a textbox + some controls alongside the WebControl with the WebView inside it, however when we call FindSession.Next or FindSession.Previous the focus on our textbox is lost and the WebView has the focus.

Is there a way to disable this behaviour? It does not seem possible to get the focus back on the textbox either.
eo_support
Posted: Friday, May 10, 2019 2:29:36 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,292
Hi,

We have tested this on the latest build and we do not see this problem. Our test steps is as follow:

1. Modify our TabbedBrowser sample application to replace the code around WebView_Command in MainWindow.xaml.cs to as follow:

private FindSession m_fs;

Code: C#
void WebView_Command(object sender, CommandEventArgs e)
{
    EO.WebBrowser.WebView webView = (EO.WebBrowser.WebView)sender;
    if (e.CommandId == m_nHomeCommand)
    {
        if (m_fs == null)
            m_fs = webView.StartFindSession("test", false);
        m_fs.Next();
    }
}


This causes the sample application to start a search for "test" the first time you press F11. And if you press F11 again, it will search for the next occurrence;

2. Run the modified TabbedBrowser sample application and load a page that contains a lot of "test". For example: https://en.wikipedia.org/wiki/Test_(assessment)

3. Make sure the focus is in the address textbox;

4. Press F11 repeatly. You will see search works as expected and the focus stays inside the address textbox;

Can you try the same steps on your end and see if it works for you?

Thanks!

PS
Posted: Monday, May 13, 2019 5:28:29 AM
Rank: Advanced Member
Groups: Member

Joined: 10/24/2018
Posts: 55
I just notice that the TabbedBrowser sample runs on WPF, while our project runs on WinForms.
Could you test it again on WinForms?
eo_support
Posted: Wednesday, May 15, 2019 4:36:22 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,292
Hi,

We tested in Windows Forms and we do not see any problems either.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.