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: 97
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: 24,218
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: 97
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: 24,218
Hi,

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

Thanks!
PS
Posted: Friday, May 24, 2019 10:16:49 AM
Rank: Advanced Member
Groups: Member

Joined: 10/24/2018
Posts: 97
Is there an example available such that we can reproduce it and check whether we have issues with that example?
eo_support
Posted: Friday, May 24, 2019 6:06:26 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
We do not have anything special at all. Just a simple form with a WebControl and a TextBox. The code is similar to the code posted above. If you still have problem, post your code and we will try it here. We are not aware of anything related to focus regarding find feature.
PS
Posted: Tuesday, May 28, 2019 10:50:00 AM
Rank: Advanced Member
Groups: Member

Joined: 10/24/2018
Posts: 97
After extensive testing it appears that this issue originates from our code base after all, it looks like everything is fine on your end :)

Thank you for taking the time to research it.


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.