locked
WebView lost focus after clicked the AppBarButton

    Question

  • Hi, 

    I'm developing a application which use the WebView to parse html as a editor in windows phone 8.1.  there are some AppBarbutton like "Bullets","CheckBox" , user click them to add the checkbox and bullets into the html, but it doesn't work now, as the WebView lost focus first after AppBarButton was clicked ,and the code "document.execCommand" can't be excuted correctly. So I think I don't want WebView lost focus when editing.

    it can work in sliverlight windows phone 8 with same work flow.

    thank you.


    Tuesday, September 23, 2014 9:00 AM

Answers

  • Thanks for your answer, I have found the solution, there is a IsTabStop property in CommandBar, can make it by setting it to false . 
    Wednesday, September 24, 2014 7:07 AM

All replies

  • Of course WebView doesn't have focus when you click on a different control. This is standard behavior.  Your scenario needs to be more fully explained for a better answer.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, September 23, 2014 2:19 PM
    Moderator
  • Thanks for your answer, I have found the solution, there is a IsTabStop property in CommandBar, can make it by setting it to false . 
    Wednesday, September 24, 2014 7:07 AM