mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Enable the arrow-body-style
ESLint rule
This manually ignores some cases where the resulting auto-formatting would not, as far as I'm concerned, constitute a readability improvement or where we'd just end up with more overall indentation. Please see https://eslint.org/docs/latest/rules/arrow-body-style
This commit is contained in:
parent
998184a00e
commit
f9a384d711
20 changed files with 78 additions and 82 deletions
|
@ -606,15 +606,14 @@ class AnnotationEditorUIManager {
|
|||
static get _keyboardManager() {
|
||||
const proto = AnnotationEditorUIManager.prototype;
|
||||
|
||||
const arrowChecker = self => {
|
||||
// If the focused element is an input, we don't want to handle the arrow.
|
||||
// For example, sliders can be controlled with the arrow keys.
|
||||
return (
|
||||
self.#container.contains(document.activeElement) &&
|
||||
document.activeElement.tagName !== "BUTTON" &&
|
||||
self.hasSomethingToControl()
|
||||
);
|
||||
};
|
||||
/**
|
||||
* If the focused element is an input, we don't want to handle the arrow.
|
||||
* For example, sliders can be controlled with the arrow keys.
|
||||
*/
|
||||
const arrowChecker = self =>
|
||||
self.#container.contains(document.activeElement) &&
|
||||
document.activeElement.tagName !== "BUTTON" &&
|
||||
self.hasSomethingToControl();
|
||||
|
||||
const textInputChecker = (_self, { target: el }) => {
|
||||
if (el instanceof HTMLInputElement) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue