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