mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
DOM not ready when restoring adminer_tables_filter
(#289)
Uncaught TypeError: Cannot set property 'value' of null
This commit is contained in:
committed by
Jakub Vrána
parent
1ce5b5ad31
commit
84e86cf572
@@ -53,7 +53,7 @@ function tablesFilterInput() {
|
||||
tablesFilterTimeout = window.setTimeout(tablesFilter, 200);
|
||||
}
|
||||
|
||||
if (sessionStorage){
|
||||
sessionStorage && document.addEventListener('DOMContentLoaded', function () {
|
||||
var db = qs('#dbs').querySelector('select');
|
||||
db = db.options[db.selectedIndex].text;
|
||||
if (db == sessionStorage.getItem('adminer_tables_filter_db') && sessionStorage.getItem('adminer_tables_filter')){
|
||||
@@ -61,7 +61,7 @@ if (sessionStorage){
|
||||
tablesFilter();
|
||||
}
|
||||
sessionStorage.setItem('adminer_tables_filter_db', db);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<p class="jsonly"><input id="filter-field" autocomplete="off"><?php echo script("qs('#filter-field').oninput = tablesFilterInput;"); ?>
|
||||
<?php
|
||||
|
Reference in New Issue
Block a user