I purchased your nice theme but I encountered a problem. Im using the HTML-Version with a grails backend.
If I use the small "navbar search form", the search is triggered, but the browser (Firefox Quantum) shows that the input-text field is transmitted, but without content/value.
Would be nice if you could help me. Best regards, Susanne Jaeckel.
changed your app.bundle.js like the following (which seems to work...), but because I'm not a javascript-guru, I don't know if it's a good solution ... document.on.click is triggered, even <enter> is pressed and seems to initialize the field, before it is transfered via the form.:
var navBarSearch = function navBarSearch() { var $openSearch = $('[data-navsearch-open]'), $closeSearch = $('[data-navsearch-close]'), $navbarForm = $('#navbar_form'), $navbarSearch = $('#navbar_search'), $document = $(document); $openSearch.on('click', function (e) { e.stopPropagation(); $navbarForm.addClass('open'); $navbarSearch.val(''); // <- initialize the field in the case, the form is opened $navbarSearch.focus(); }); $closeSearch.on('click', function (e) { e.stopPropagation(); $navbarForm.removeClass('open'); //$navbarSearch.val(''); }); $document.on('click', function (e) { e.stopPropagation(); if (e.target !== $('#navbar_search')) { $navbarForm.removeClass('open'); //$navbarSearch.val(''); } }); $navbarSearch.on('click', function (e) { e.stopPropagation(); }); };
I purchased your nice theme but I […]
I purchased your nice theme but I encountered a problem. Im using the HTML-Version with a grails backend.
If I use the small "navbar search form", the search is triggered, but the browser (Firefox Quantum) shows that the input-text field is transmitted, but without content/value.
Would be nice if you could help me.
Best regards,
Susanne Jaeckel.
changed your app.bundle.js like the following (which seems to work...), but because I'm not a javascript-guru, I don't know if it's a good solution ...
document.on.click is triggered, even <enter> is pressed and seems to initialize the field, before it is transfered via the form.:
var navBarSearch = function navBarSearch() {
var $openSearch = $('[data-navsearch-open]'),
$closeSearch = $('[data-navsearch-close]'),
$navbarForm = $('#navbar_form'),
$navbarSearch = $('#navbar_search'),
$document = $(document);
$openSearch.on('click', function (e) {
e.stopPropagation();
$navbarForm.addClass('open');
$navbarSearch.val(''); // <- initialize the field in the case, the form is opened
$navbarSearch.focus();
});
$closeSearch.on('click', function (e) {
e.stopPropagation();
$navbarForm.removeClass('open');
//$navbarSearch.val('');
});
$document.on('click', function (e) {
e.stopPropagation();
if (e.target !== $('#navbar_search')) {
$navbarForm.removeClass('open');
//$navbarSearch.val('');
}
});
$navbarSearch.on('click', function (e) {
e.stopPropagation();
});
};