2020-06-05 22:03:37 +00:00
|
|
|
"use strict";
|
2016-08-28 16:53:06 +00:00
|
|
|
|
2020-06-05 22:03:37 +00:00
|
|
|
const misc = require("./misc.js");
|
|
|
|
const keyboard = require("../util/keyboard.js");
|
|
|
|
const views = require("./views.js");
|
2016-08-28 16:53:06 +00:00
|
|
|
|
|
|
|
function searchInputNodeFocusHelper(inputNode) {
|
2020-06-05 22:03:37 +00:00
|
|
|
keyboard.bind("q", () => {
|
2016-08-28 16:53:06 +00:00
|
|
|
inputNode.focus();
|
|
|
|
inputNode.setSelectionRange(
|
2020-06-05 22:03:37 +00:00
|
|
|
inputNode.value.length,
|
|
|
|
inputNode.value.length
|
|
|
|
);
|
2016-08-28 16:53:06 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2016-09-29 09:16:55 +00:00
|
|
|
module.exports = {
|
|
|
|
searchInputNodeFocusHelper: searchInputNodeFocusHelper,
|
|
|
|
};
|