mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
browser: IE11 - you guess it #452
This commit is contained in:
parent
bf79988c2c
commit
9783b8af0f
1 changed files with 6 additions and 2 deletions
|
@ -1021,7 +1021,9 @@ function initSearch() {
|
||||||
e.addEventListener( 'click', function(){
|
e.addEventListener( 'click', function(){
|
||||||
inputs.forEach( function( e ){
|
inputs.forEach( function( e ){
|
||||||
e.value = '';
|
e.value = '';
|
||||||
e.dispatchEvent( new Event( 'input' ) );
|
var event = document.createEvent( 'Event' );
|
||||||
|
event.initEvent( 'input', false, false );
|
||||||
|
e.dispatchEvent( event );
|
||||||
});
|
});
|
||||||
unmark();
|
unmark();
|
||||||
});
|
});
|
||||||
|
@ -1039,7 +1041,9 @@ function initSearch() {
|
||||||
var searchValue = sessionStorage.getItem( baseUriFull+'search-value' );
|
var searchValue = sessionStorage.getItem( baseUriFull+'search-value' );
|
||||||
inputs.forEach( function( e ){
|
inputs.forEach( function( e ){
|
||||||
e.value = searchValue;
|
e.value = searchValue;
|
||||||
e.dispatchEvent( new Event( 'input' ) );
|
var event = document.createEvent( 'Event' );
|
||||||
|
event.initEvent( 'input', false, false );
|
||||||
|
e.dispatchEvent( event );
|
||||||
});
|
});
|
||||||
|
|
||||||
var found = elementContains( searchValue, document.querySelector( '#body-inner' ) );
|
var found = elementContains( searchValue, document.querySelector( '#body-inner' ) );
|
||||||
|
|
Loading…
Reference in a new issue