c->mode->flags &= ~FLAG_HINTING;
vb_input_set_text(c, "");
- call_hints_function(c, "clear", "");
+ call_hints_function(c, "clear", "true");
/* if open window was not allowed for JavaScript, restore this */
if (!hints.allow_open_win) {
}
function onresize() {
- clear();
+ clear(false);
create();
show(false);
}
- function clear() {
- var i, j, doc, e;
+ function clear(removeListener) {
+ var i, j, doc, e, w = window;
+ if (removeListener && w) {
+ w.removeEventListener("resize", onresize, true);
+ w.removeEventListener("scroll", onresize, false);
+ }
for (i = 0; i < docs.length; i++) {
doc = docs[i];
/* find all hinted elements vimbhint 'hint' */
filterKeys = "";
show(false);
} else {
- clear();
+ clear(true);
}
return res || config.action(e);
}
return "ERROR:";
},
- clear: function() {
- clear();
- if (window) {
- window.removeEventListener("resize", onresize, true);
- window.removeEventListener("scroll", onresize, false);
- }
- },
- fire: fire,
- focus: focus,
+ clear: clear,
+ fire: fire,
+ focus: focus,
};
})());