Skip to content

Commit

Permalink
Remove the other input support in arrow keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Jazza-231 committed Oct 26, 2023
1 parent 346eaff commit c23cd5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
5 changes: 3 additions & 2 deletions addons/editor-number-arrow-keys/addon.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"tags": ["editor", "codeEditor", "recommended"],
"versionAdded": "1.34.0",
"latestUpdate": {
"version": "1.36.0",
"temporaryNotice": "More inputs are now supported, such as color dropdowns, and onion skinning inputs."
"version": "1.35.0",
"newSettings": ["useCustom"],
"temporaryNotice": "You can now increment input fields that are not in blocks, like the sprite properties, and fully customize the values."
},
"userscripts": [
{
Expand Down
14 changes: 2 additions & 12 deletions addons/editor-number-arrow-keys/userscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,10 @@ export default async function ({ addon }) {
) {
// All costume editor inputs (in the top bar: outline width, brush size, etc) except costume name
return true;
} else if (el.matches("[class*=Popover-body]" + type)) {
// Any inputs in the colour popover
return true;
}
// Doing math in the following inputs is almost useless, but for consistency we'll allow it
} else if (el.matches("[class*=sa-paint-snap-settings]" + type)) {
// The paint-snap distance setting
return true;
} else if (el.matches("[class*=sa-onion-settings]" + type)) {
// All inputs in the onion-skinning settings
return true;
if (!isSupportedChecked) return isSupportedElement(el, true);
return false;
}
if (!isSupportedChecked) return isSupportedElement(el, true);
return false;
};

document.body.addEventListener("keydown", (e) => {
Expand Down

0 comments on commit c23cd5d

Please sign in to comment.