AIR for iOS:StageWebView内のmailtoリンクが動かなくて困っています

6 views
Skip to first unread message

中尾義昭

unread,
Jun 19, 2013, 3:01:52 AM6/19/13
to AF...@googlegroups.com
AIR for iOSでの現象なのですが、
StageWebViewでloadURLでHTMLを読み込んで表示させたアプリを開発中です。
HTML内のmailtoリンクが動きません。
※AIR for Androidは大丈夫でした。

LocationChangeEvent.LOCATION_CHANGING
でStageWebViewのURLが変更された時にnavigateToURLしたのですが
LocationChangeEvent自体が動かないみたいなのです~
iOSではメールリンクはLocationChangeEventが発動しないのでしょうか?

/*----------------------------------------------------------------------------------------------------------------------*/
var webView:StageWebView = new StageWebView();
webView.stage=this.stage;
webView.loadURL("http://www.google.co.jp/");
webView.addEventListener(LocationChangeEvent.LOCATION_CHANGING,f_load);
webView.viewPort=new Rectangle(0,0,stage.stageWidth,stage.stageHeight);
function f_load(e:LocationChangeEvent):void {
    trace(e.location);   //←iOSだとこの時点で反応なし
    var v_getURL=e.location;
    if (v_getURL.match(/mailto:/)) {    //URLに「mailto:」の文字列があるとき
        navigateToURL(new URLRequest(v_getURL));    //OSのブラウザ起動
        e.preventDefault();    //読み込み中止
    }
}
/*----------------------------------------------------------------------------------------------------------------------*/

ソースこんな感じです。(間違ってたらごめんなさい)
宜しくお願いします。
Reply all
Reply to author
Forward
0 new messages