Overlay background close not working on IOS





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have a modal window on my site that displays a search box.
on a desktop screen, when I click on the background, it closes.



My problem is that on IOS, when I click on the background to close, it does not close.



Could you help me please ?



    search_form: function () {
var self = this,
$searchButton = $('.search-button');

if ($searchButton.length <= 0)
return;

var $searchForm = $('#search-form');
var $searchInput = $searchForm.find('input[type="text"]');

self.$document.on('click', function (e) {
if (!$(e.target).is($searchInput)) {
if ($(e.target).is($searchButton)) {
$searchForm.toggleClass('showing');
setTimeout(function () {
$searchInput.focus();
var tmpStr = $searchInput.val();
$searchInput.val('');
$searchInput.val(tmpStr);
}, 100);
}
else {
$searchForm.removeClass('showing');
}

}

});
},


#search-form {
position: fixed;
width: 100%;
height: 100%;
display: block;
top: 0;
left: 0;
background: rgba(230, 29, 114, 0.95);
z-index: 99995 !important;
opacity: 0;
visibility: hidden;
cursor: url(../img/search-close.png), ne-resize;
overflow-x: hidden;
overflow-y: auto;}



#search-form.showing {
opacity: 1;
visibility: visible;
cursor: url(../img/search-close.png), ne-resize;}



<div id="search-form" class="showing"><div class="search-form">
<form role="search" method="get" class="searchform" action="#">
<div>
<input type="text" placeholder="Saisissez le mot clé" value="" name="s">
<input type="hidden" name="post_type" value="product">
</div>
</form>

</div>
<span id="search-caption" class="flashit">Appuyer sur la touche <strong>"Entrée"</strong> pour lancer votre recherche</span>
</div>


PS : Sorry for formatted code, it's my first post.



Thank you and have a good day










share|improve this question























  • Sorry "hello everyone" did not put in my answer ! So, Hello Everyone ;)

    – Emi Ho
    Nov 17 '18 at 6:26




















0















I have a modal window on my site that displays a search box.
on a desktop screen, when I click on the background, it closes.



My problem is that on IOS, when I click on the background to close, it does not close.



Could you help me please ?



    search_form: function () {
var self = this,
$searchButton = $('.search-button');

if ($searchButton.length <= 0)
return;

var $searchForm = $('#search-form');
var $searchInput = $searchForm.find('input[type="text"]');

self.$document.on('click', function (e) {
if (!$(e.target).is($searchInput)) {
if ($(e.target).is($searchButton)) {
$searchForm.toggleClass('showing');
setTimeout(function () {
$searchInput.focus();
var tmpStr = $searchInput.val();
$searchInput.val('');
$searchInput.val(tmpStr);
}, 100);
}
else {
$searchForm.removeClass('showing');
}

}

});
},


#search-form {
position: fixed;
width: 100%;
height: 100%;
display: block;
top: 0;
left: 0;
background: rgba(230, 29, 114, 0.95);
z-index: 99995 !important;
opacity: 0;
visibility: hidden;
cursor: url(../img/search-close.png), ne-resize;
overflow-x: hidden;
overflow-y: auto;}



#search-form.showing {
opacity: 1;
visibility: visible;
cursor: url(../img/search-close.png), ne-resize;}



<div id="search-form" class="showing"><div class="search-form">
<form role="search" method="get" class="searchform" action="#">
<div>
<input type="text" placeholder="Saisissez le mot clé" value="" name="s">
<input type="hidden" name="post_type" value="product">
</div>
</form>

</div>
<span id="search-caption" class="flashit">Appuyer sur la touche <strong>"Entrée"</strong> pour lancer votre recherche</span>
</div>


PS : Sorry for formatted code, it's my first post.



Thank you and have a good day










share|improve this question























  • Sorry "hello everyone" did not put in my answer ! So, Hello Everyone ;)

    – Emi Ho
    Nov 17 '18 at 6:26
















0












0








0


1






I have a modal window on my site that displays a search box.
on a desktop screen, when I click on the background, it closes.



My problem is that on IOS, when I click on the background to close, it does not close.



Could you help me please ?



    search_form: function () {
var self = this,
$searchButton = $('.search-button');

if ($searchButton.length <= 0)
return;

var $searchForm = $('#search-form');
var $searchInput = $searchForm.find('input[type="text"]');

self.$document.on('click', function (e) {
if (!$(e.target).is($searchInput)) {
if ($(e.target).is($searchButton)) {
$searchForm.toggleClass('showing');
setTimeout(function () {
$searchInput.focus();
var tmpStr = $searchInput.val();
$searchInput.val('');
$searchInput.val(tmpStr);
}, 100);
}
else {
$searchForm.removeClass('showing');
}

}

});
},


#search-form {
position: fixed;
width: 100%;
height: 100%;
display: block;
top: 0;
left: 0;
background: rgba(230, 29, 114, 0.95);
z-index: 99995 !important;
opacity: 0;
visibility: hidden;
cursor: url(../img/search-close.png), ne-resize;
overflow-x: hidden;
overflow-y: auto;}



#search-form.showing {
opacity: 1;
visibility: visible;
cursor: url(../img/search-close.png), ne-resize;}



<div id="search-form" class="showing"><div class="search-form">
<form role="search" method="get" class="searchform" action="#">
<div>
<input type="text" placeholder="Saisissez le mot clé" value="" name="s">
<input type="hidden" name="post_type" value="product">
</div>
</form>

</div>
<span id="search-caption" class="flashit">Appuyer sur la touche <strong>"Entrée"</strong> pour lancer votre recherche</span>
</div>


PS : Sorry for formatted code, it's my first post.



Thank you and have a good day










share|improve this question














I have a modal window on my site that displays a search box.
on a desktop screen, when I click on the background, it closes.



My problem is that on IOS, when I click on the background to close, it does not close.



Could you help me please ?



    search_form: function () {
var self = this,
$searchButton = $('.search-button');

if ($searchButton.length <= 0)
return;

var $searchForm = $('#search-form');
var $searchInput = $searchForm.find('input[type="text"]');

self.$document.on('click', function (e) {
if (!$(e.target).is($searchInput)) {
if ($(e.target).is($searchButton)) {
$searchForm.toggleClass('showing');
setTimeout(function () {
$searchInput.focus();
var tmpStr = $searchInput.val();
$searchInput.val('');
$searchInput.val(tmpStr);
}, 100);
}
else {
$searchForm.removeClass('showing');
}

}

});
},


#search-form {
position: fixed;
width: 100%;
height: 100%;
display: block;
top: 0;
left: 0;
background: rgba(230, 29, 114, 0.95);
z-index: 99995 !important;
opacity: 0;
visibility: hidden;
cursor: url(../img/search-close.png), ne-resize;
overflow-x: hidden;
overflow-y: auto;}



#search-form.showing {
opacity: 1;
visibility: visible;
cursor: url(../img/search-close.png), ne-resize;}



<div id="search-form" class="showing"><div class="search-form">
<form role="search" method="get" class="searchform" action="#">
<div>
<input type="text" placeholder="Saisissez le mot clé" value="" name="s">
<input type="hidden" name="post_type" value="product">
</div>
</form>

</div>
<span id="search-caption" class="flashit">Appuyer sur la touche <strong>"Entrée"</strong> pour lancer votre recherche</span>
</div>


PS : Sorry for formatted code, it's my first post.



Thank you and have a good day







jquery ios






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 17 '18 at 6:19









Emi HoEmi Ho

1




1













  • Sorry "hello everyone" did not put in my answer ! So, Hello Everyone ;)

    – Emi Ho
    Nov 17 '18 at 6:26





















  • Sorry "hello everyone" did not put in my answer ! So, Hello Everyone ;)

    – Emi Ho
    Nov 17 '18 at 6:26



















Sorry "hello everyone" did not put in my answer ! So, Hello Everyone ;)

– Emi Ho
Nov 17 '18 at 6:26







Sorry "hello everyone" did not put in my answer ! So, Hello Everyone ;)

– Emi Ho
Nov 17 '18 at 6:26














0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53348786%2foverlay-background-close-not-working-on-ios%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53348786%2foverlay-background-close-not-working-on-ios%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

List item for chat from Array inside array React Native

Thiostrepton

Caerphilly