|
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.
|
|
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!
|
|
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?
|
|
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!
|
|
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?
|
|
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.
|
|
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.
|
|