使用Cordova构建APK的基于Jquery
,html
,css
的应用程序。
我有另一个功能,长按在屏幕上,它通过点击两个字符串的中间来工作,以避免默认对话框。大多数情况下,默认设备长按对话框弹出窗口显示在屏幕顶部。如何禁用以下屏幕截图中显示的顶部?尝试了一些css
和Javascript
技巧,但没有任何帮助。
以下是长按对话框的代码
$(document).on("mousedown touchstart","#table_discrepancy tr", function() {
var orderno = $(this).find("td:eq(0)").text();
var workorderno = $(this).find("td:eq(1)").text();
var timer = setTimeout(function() {
server('/get_customer_info/' + orderno, function(result){
var cus_name = result.name.replace(/^[\s]+/, '');
cus_name = cus_name.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
var phone_no = result.phoneno.replace(/^[\s]+/, '');
var email = result.email.replace(/^[\s]+/, '');
$('#customer_info_modal').modal('show');
$('#orderno_modal').html('Order# : ' + orderno);
$('#workorderno_modal').html('Work Order# : ' + workorderno);
$('#customer_name_modal').html('Name : ' + cus_name);
$('#customer_phoneno_modal').html('Phone#: ' + phone_no);
$('#customer_email_modal').html('Email: ' + email);
});
}, 1000);
$(this).on("mouseup touchstart", function() {
clearTimeout(timer);
});
})
答案 0 :(得分:0)
通过在正文中添加{class 1}定义来阻止,它不允许从屏幕中选择任何内容
ui <- fluidPage(
dashboardPage(
dashboardHeader(title = "text"),
dashboardSidebar(
sidebarMenu(id = 'MenuTabs',
menuItem("Tab1", tabName = "tab1", selected = TRUE)
# menuItem("Tab1", tabName = "tab2")
)
),
dashboardBody(
tabItems(
tabItem("tab1",
actionButton("newplot", "New plot")),
tabItem("tab2",
plotOutput('Plot'))
)
)
)
)
server <- function(input, output, session){
output$Plot <- renderPlot({
input$newplot
cars2 <- cars + rnorm(nrow(cars))
plot(cars2)
})
}
shinyApp(ui, server)