locked
Disable LaunchURi Async of WebView in Windows 8.1 RRS feed

  • 質問

  • When I click on any email attachment download link in webview e.g. gmail attachment.

    IE opens and there login credentials are asked again and then download happens.

    Is there any way to disable this 

    i.e. "when i click on any link automatically IE or any other app should get launch , i should not get away from my app context

    and rather have it handled by "UnViewableContent Identified".

    Please tell is it possible?

    2013年9月12日 12:29

回答

  • The behavior you are experiencing is by design. If you want to prevent this from happening, you can retrieve the HTML content outside of the WebView, parse the HTML with the functionality you are targeting. That way you have full control over the HTML content and what you can/cannot do with it.

    Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvz

    2013年9月13日 17:20
    モデレータ

すべての返信

  • I am assuming you are talking about the "Basic HTML" view in gmail. If that's true, then an attachment in the email actually is a <a href="..." target="_blank"> which indicates that the hyperlink should open up in a new window.

    With target="_blank" or any other named window, WebView control will open up the hyperlink in a new IE window. You cannot prevent that from happening.


    Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvz

    2013年9月12日 21:28
    モデレータ
  • This is very bad, there should have been option whether  user want to allow to launch IE or not in ideal case.It ruining all experience by going out of my application.. But i guess only way is to change html after it is loaded.

    For curiosity if all browser all removed from system including IE, what will happen on licking on such link, would it direct me to "UnViewableContent Identified" event.


    2013年9月13日 6:34
  • The behavior you are experiencing is by design. If you want to prevent this from happening, you can retrieve the HTML content outside of the WebView, parse the HTML with the functionality you are targeting. That way you have full control over the HTML content and what you can/cannot do with it.

    Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvz

    2013年9月13日 17:20
    モデレータ