From 10d6b5898db2c7f34fbe293d6d9a7cc6b6e37e0a Mon Sep 17 00:00:00 2001 From: Jinhyuk Jun Date: Tue, 30 Apr 2013 13:56:05 +0900 Subject: [PATCH] TizenWinset : bug fix(N_SE-36666) close popup only current popup is active(ui-popup-active) Change-Id: Id7a85b378d00b19311ba7f6137d0a574eee35f47 --- demos/tizen-winsets/widgets/popupwindow/popupwindow.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/demos/tizen-winsets/widgets/popupwindow/popupwindow.js b/demos/tizen-winsets/widgets/popupwindow/popupwindow.js index f62f272..f505747 100644 --- a/demos/tizen-winsets/widgets/popupwindow/popupwindow.js +++ b/demos/tizen-winsets/widgets/popupwindow/popupwindow.js @@ -15,14 +15,17 @@ $( document ).one( "pageinit", "#popupwindow-demo", function () { function onSuccessPopupCallback ( ori ) { if ( ori.status === "PORTRAIT_PRIMARY" || ori.status === "PORTRAIT_SECONDARY" ) { - $("#textbox_popup_landscape").popup("close"); - $("#go_textbox_popup a").attr("href", "#textbox_popup"); + if( $( "#textbox_popup_landscape" ).parents( ".ui-popup-container" ).is( ".ui-popup-active" ) ) { + $( "#textbox_popup_landscape" ).popup( "close" ); + } + $( "#go_textbox_popup a" ).attr( "href", "#textbox_popup" ); } else if ( ori.status === "LANDSCAPE_PRIMARY" || ori.status === "LANDSCAPE_SECONDARY" ) { - $("#textbox_popup").popup("close"); - $("#go_textbox_popup a").attr("href", "#textbox_popup_landscape"); + if( $( "#textbox_popup" ).parents( ".ui-popup-container" ).is( ".ui-popup-active" ) ) { + $( "#textbox_popup" ).popup( "close" ); + } + $( "#go_textbox_popup a" ).attr( "href", "#textbox_popup_landscape" ); } - } function onErrorPopupCallback ( error ) { -- 2.7.4