Rank: Advanced Member Groups: Member
Joined: 7/21/2014 Posts: 129
|
Hi, When you navigate on a page with an input with the autofocus attribute, the webbrowser don't set focus on this element. It seems the autofocus attribute on the html input is ignored. Page sample : http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_autofocusIs there something can I do for the EO.webbrowser and autofocus html attribute become friends? :) Thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
We tested this and it seems to be working fine. The autofocus only matters if the focus is inside the WebView. For example:
1. If the WebView is the only control inside a Form, then when the Form is displayed, the WebView will be automatically focused (since its the only child control). When the WebView is focused, it will set focus to the autofocus input element; 2. If the Form has a TextBox and a WebView with the TextBox being the first control, then when the Form is displayed, the TextBox will be focused. Nothing inside the WebView will be focused at this point since the WebView as a whole does not have focus. However if user tabs into the WebView from the TextBox, then the autofocus input element will be focused;
In a way, you can think autofocus as a shortcut to change an input element's tab order to be before all other input elements in the page. It does not automatically grab focus, instead it only affects the tab order when the focus is given to the WebView.
Hope this helps. Please feel free to let us know if you have any more questions.
Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 7/21/2014 Posts: 129
|
Hi,
Thanks for your advice., I've resolved the "problem" by using the ActiveControl property and the .Focus() method.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Yes. That will work. Thanks for the update!
|