mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-09 04:06:27 -04:00
Fix unresponsive search prefix (#726)
This commit is contained in:
parent
05a1409fe2
commit
bb5136e677
@ -4719,7 +4719,7 @@ function onKeyUpPrefix (evt) {
|
|||||||
// Don't process anything if it's the same prefix as recently entered (this prevents searching
|
// Don't process anything if it's the same prefix as recently entered (this prevents searching
|
||||||
// if user is simply using arrow key to correct something typed).
|
// if user is simply using arrow key to correct something typed).
|
||||||
if (!/^\s/.test(prefix.value) && prefix.value === appstate.tempPrefix) return;
|
if (!/^\s/.test(prefix.value) && prefix.value === appstate.tempPrefix) return;
|
||||||
if (prefix.value && prefix.value.length > 0 && (prefix.value !== appstate.search.prefix || /^\s/.test(prefix.value))) {
|
if (prefix.value && prefix.value.length > 0) {
|
||||||
appstate.tempPrefix = prefix.value;
|
appstate.tempPrefix = prefix.value;
|
||||||
document.getElementById('searchArticles').click();
|
document.getElementById('searchArticles').click();
|
||||||
}
|
}
|
||||||
@ -5365,7 +5365,7 @@ function articleLoader (entry, mimeType) {
|
|||||||
|
|
||||||
// Add event listener to iframe window to check for links to external resources
|
// Add event listener to iframe window to check for links to external resources
|
||||||
function filterClickEvent (event) {
|
function filterClickEvent (event) {
|
||||||
console.debug('filterClickEvent fired');
|
// console.debug('filterClickEvent fired');
|
||||||
// Ignore click if we are dealing with an image that has not yet been extracted
|
// Ignore click if we are dealing with an image that has not yet been extracted
|
||||||
if (event.target.dataset && event.target.dataset.kiwixhidden) return;
|
if (event.target.dataset && event.target.dataset.kiwixhidden) return;
|
||||||
// Find the closest enclosing A tag (if any)
|
// Find the closest enclosing A tag (if any)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user