【发布时间】:2025-12-22 08:20:07
【问题描述】:
运行这个 qooxdoo 移动小示例,按“弹出”按钮,然后按 2 次移动硬件的返回按钮(或浏览器的返回按钮)。
再次运行示例,按“Popup”按钮,按“Close Popup”按钮,然后按移动硬件的返回按钮(或浏览器的返回按钮)。
为什么又弹窗了? 我做错了什么,我的误解是什么?我需要“关闭弹出窗口”按钮像硬件后退按钮一样工作。为什么行为不同?如何解决我的错误?
谢谢(对不起我的英语不好)
var routing = qx.core.Init.getApplication().getRouting();
var btnClose = new qx.ui.mobile.form.Button("Close Popup");
btnClose.addListener("tap", function() {
routing.back();
});
var popup = new qx.ui.mobile.dialog.Popup(btnClose);
popup.setModal(true);
popup.setTitle("A Popup");
var page1 = new qx.ui.mobile.page.NavigationPage();
page1.setTitle("Page 1");
page1.addListener("initialize", function() {
var button = new qx.ui.mobile.form.Button("Popup");
page1.getContent().add(button);
button.addListener("tap", function() {
routing.executeGet("/popup");
});
});
var manager = new qx.ui.mobile.page.Manager(false);
manager.addDetail([page1]);
routing.onGet("/", page1.show, page1);
routing.onGet("/popup", popup.show, popup);
routing.init();
【问题讨论】:
标签: mobile url-routing qooxdoo