[bug] fix search not clearing before link render on load

This commit is contained in:
zombieFox 2019-12-23 00:57:52 +00:00
parent 6998637efc
commit 340fad2656
6 changed files with 18 additions and 11 deletions

View File

@ -1,6 +1,6 @@
{
"name": "nighttab",
"version": "4.3.0",
"version": "4.4.1",
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
"main": "index.js",
"scripts": {

View File

@ -5,6 +5,7 @@ state.init();
bookmarks.init();
theme.init();
menu.init();
search.init();
link.init();
control.init();
greeting.init();
@ -14,7 +15,6 @@ clock.init();
keyboard.init();
layout.init();
background.init();
search.init();
header.init();
modal.init();
shade.init();

View File

@ -1744,10 +1744,10 @@ var link = (function() {
render.clear.item();
render.clear.group();
render.all();
bind.sort.group();
bind.sort.item();
render.group.tabindex();
render.item.tabindex();
bind.sort.group();
bind.sort.item();
};
var init = function() {

View File

@ -5,7 +5,7 @@ var search = (function() {
bind.input = function() {
var searchInput = helper.e(".search-input");
searchInput.addEventListener("input", function() {
mod.searching.set();
mod.searching.open();
render.clear.button();
render.searching();
link.groupAndItems();
@ -16,7 +16,7 @@ var search = (function() {
var searchClear = helper.e(".search-clear");
searchClear.addEventListener("click", function() {
render.clear.input();
mod.searching.set();
mod.searching.close();
render.clear.button();
render.searching();
link.groupAndItems();
@ -26,11 +26,18 @@ var search = (function() {
var mod = {};
mod.searching = {
set: function() {
open: function() {
helper.setObject({
object: state.get.current(),
path: "search",
newValue: helper.e(".search-input").value != ""
newValue: true
});
},
close: function() {
helper.setObject({
object: state.get.current(),
path: "search",
newValue: false
});
}
};
@ -123,7 +130,7 @@ var search = (function() {
var init = function() {
bind.input();
bind.clear();
mod.searching.set();
mod.searching.close();
render.engine();
render.focus();
render.searching();

View File

@ -1,6 +1,6 @@
var version = (function() {
var current = "4.4.0";
var current = "4.4.1";
var name = "Enchanting Aardvark";

View File

@ -2,7 +2,7 @@
"name": "nightTab",
"short_name": "nightTab",
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
"version": "4.4.0",
"version": "4.4.1",
"manifest_version": 2,
"chrome_url_overrides": {
"newtab": "index.html"