简体   繁体   English

为什么选择菜单始终显示在模式对话框下?

[英]Why does the select menu always appear under the modal dialog?

I am using a modal dialog with a tag in it. 我正在使用带有标签的模式对话框。 I am using appframework and appui, building to apk for android. 我正在使用appframework和appui,为Android构建APK。 I went to build my code out again after xdk updated and suddenly my select menu always appears under the modal dialog. xdk更新后,我又去重新构建代码,突然我的选择菜单始终出现在模式对话框下。 I have changed nothing. 我什么都没改变。 No matter what I do this consistently happens, but mostly on Samsung devices or anything running android lollipop. 无论我做什么,这种情况都会持续发生,但主要发生在三星设备或任何运行android棒棒糖的设备上。 The same goes for the inbuilt ripple emulator. 内置波纹仿真器也是如此。 I am at my wits end as far as this problem goes. 就这个问题而言,我尽全力。 I have tried building out using crosswalk as well. 我也尝试过使用人行横道。 I have tried setting the z-index of the select menu and modal panel. 我尝试设置选择菜单和模式面板的z索引。 Nothing works. 什么都没有。 If I stop the panel being modal everything is fine, but this is not an option client will not accept anything short of a modal dialog. 如果我停止将面板设置为模态面板,则一切都很好,但这不是一个选项,客户端将不接受模态对话框之外的任何内容。

Could this be relevant af.selectBox.js from app ui codebase 这可能与应用ui代码库中的af.selectBox.js相关

I don't care if I have to use a dirty hack I just want to fix it! 我不在乎是否必须使用肮脏的技巧,我只想修复它!

Here is what my problem looks like. 这是我的问题。 The exact same thing happens on REAL DEVICES, WITH A REAL BUILDOUT, as well as in crosswalk app preview. 完全一样的事情会在REAL设备,具有REAL BUILDOUT以及人行横道应用预览中发生。 在此处输入图片说明

Here is the select element. 这是选择元素。

<select class="wide-control" id="select_timeout">
    <option value="15">15 Mins</option>
    <option value="30">30 Mins</option>
    <option value="45">45 Mins</option>
    <option value="60">1 Hour</option>
    <option value="75">1 Hour 15 Mins</option>
    <option value="90">1 Hour 30 Mins</option>
    <option value="105">1 Hour 45 Mins</option>
    <option value="120">2 Hours</option>
    <option value="135">2 Hours 15 Mins</option>
    <option value="150">2 Hours 30 Mins</option>
    <option value="165">2 Hours 45 Mins</option>
    <option value="180">3 Hours</option>
</select>

And here is how I am declaring my modal panel: 这是我声明模态面板的方式:

<div class="upage panel" data-modal="true" data-load="enterSettings" data-unload="leaveSettings" id="page_settings" data-footer="none">

This all worked perfectly a day ago, no code changed. 所有这些在一天前都可以正常运行,而无需更改代码。

OMG! 我的天啊! got it. 得到它了。 here is the fix 这是修复

#afui #afui_modal{
    z-index: 4000 !important; /*set to something other than 9999*/
}

knew it was z-order problem 知道这是Z阶问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM