event for select boxes to disable androids JS calls
This commit is contained in:
@ -32,13 +32,6 @@ window.portalHighlighterControl = function() {
|
||||
});
|
||||
$("#portal_highlight_select").val(_current_highlighter);
|
||||
$("#portal_highlight_select").change(function(){ changePortalHighlights($(this).val());});
|
||||
// notify android that the select spinner is enabled.
|
||||
// this disables javascript injection on android side.
|
||||
// if android is not notified, the spinner closes on the next JS call
|
||||
if (typeof android !== 'undefined' && android && android.spinnerEnabled) {
|
||||
$("#portal_highlight_select").click(function(){ android.spinnerEnabled(true);});
|
||||
$("#portal_highlight_select").focus(function(){ android.spinnerEnabled(false);});
|
||||
}
|
||||
$(".leaflet-top.leaflet-left").css('padding-top', '20px');
|
||||
$(".leaflet-control-scale-line").css('margin-top','25px');
|
||||
}
|
||||
|
@ -125,6 +125,18 @@ window.runOnSmartphonesAfterBoot = function() {
|
||||
var l = $('#chatcontrols a:visible');
|
||||
l.css('width', 100/l.length + '%');
|
||||
|
||||
// notify android that a select spinner is enabled.
|
||||
// this disables javascript injection on android side.
|
||||
// if android is not notified, the spinner closes on the next JS call
|
||||
if (typeof android !== 'undefined' && android && android.spinnerEnabled) {
|
||||
$("body").on("click", "select", function() {
|
||||
android.spinnerEnabled(true);
|
||||
});
|
||||
$("body").on("focus", "select", function() {
|
||||
android.spinnerEnabled(false);
|
||||
});
|
||||
}
|
||||
|
||||
// add event to portals that allows long press to switch to sidebar
|
||||
window.addHook('portalAdded', function(data) {
|
||||
data.portal.on('add', function() {
|
||||
|
Reference in New Issue
Block a user