in frontend/src/assets/js/lib/ace/ext-searchbox.js [85:131]
this.$init = function () {
var sb = this.element;
this.$initElements(sb);
var _this = this;
event.addListener(sb, "mousedown", function (e) {
setTimeout(function () {
_this.activeInput.focus();
}, 0);
event.stopPropagation(e);
});
event.addListener(sb, "click", function (e) {
var t = e.target || e.srcElement;
var action = t.getAttribute("action");
if (action && _this[action])
_this[action]();
else if (_this.$searchBarKb.commands[action])
_this.$searchBarKb.commands[action].exec(_this);
event.stopPropagation(e);
});
event.addCommandKeyListener(sb, function (e, hashId, keyCode) {
var keyString = keyUtil.keyCodeToString(keyCode);
var command = _this.$searchBarKb.findKeyCommand(hashId, keyString);
if (command && command.exec) {
command.exec(_this);
event.stopEvent(e);
}
});
this.$onChange = lang.delayedCall(function () {
_this.find(false, true, false);
});
event.addListener(this.searchInput, "input", function () {
_this.$onChange.schedule(20);
});
event.addListener(this.searchInput, "focus", function () {
_this.activeInput = _this.searchInput;
_this.searchInput.value && _this.highlight();
});
event.addListener(this.replaceInput, "focus", function () {
_this.activeInput = _this.replaceInput;
_this.searchInput.value && _this.highlight();
});
};