Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove touchInputEnabled and pointerEventsEnabled #1585

Merged
merged 12 commits into from
Nov 25, 2024
10 changes: 0 additions & 10 deletions ext/data/schemas/options-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,6 @@
"required": [
"inputs",
"preventMiddleMouse",
"touchInputEnabled",
"pointerEventsEnabled",
"selectText",
"alphanumeric",
"autoHideResults",
Expand Down Expand Up @@ -676,14 +674,6 @@
}
}
},
"touchInputEnabled": {
"type": "boolean",
"default": true
},
"pointerEventsEnabled": {
"type": "boolean",
"default": false
},
"selectText": {
"type": "boolean",
"default": true
Expand Down
2 changes: 0 additions & 2 deletions ext/js/app/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,6 @@ export class Frontend {
normalizeCssZoom: scanningOptions.normalizeCssZoom,
selectText: scanningOptions.selectText,
delay: scanningOptions.delay,
touchInputEnabled: scanningOptions.touchInputEnabled,
pointerEventsEnabled: scanningOptions.pointerEventsEnabled,
scanLength: scanningOptions.length,
layoutAwareScan: scanningOptions.layoutAwareScan,
matchTypePrefix: scanningOptions.matchTypePrefix,
Expand Down
13 changes: 13 additions & 0 deletions ext/js/data/options-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ export class OptionsUtil {
this._updateVersion52,
this._updateVersion53,
this._updateVersion54,
this._updateVersion55,
];
/* eslint-enable @typescript-eslint/unbound-method */
if (typeof targetVersion === 'number' && targetVersion < result.length) {
Expand Down Expand Up @@ -1521,6 +1522,18 @@ export class OptionsUtil {
}
}

/**
* - Remove scanning.touchInputEnabled
* - Remove scanning.pointerEventsEnabled
* @type {import('options-util').UpdateFunction}
*/
async _updateVersion55(options) {
for (const profile of options.profiles) {
delete profile.options.scanning.touchInputEnabled;
delete profile.options.scanning.pointerEventsEnabled;
}
}

/**
* @param {string} url
* @returns {Promise<chrome.tabs.Tab>}
Expand Down
4 changes: 0 additions & 4 deletions ext/js/display/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,6 @@ export class Display extends EventDispatcher {
normalizeCssZoom: scanningOptions.normalizeCssZoom,
selectText: scanningOptions.selectText,
delay: scanningOptions.delay,
touchInputEnabled: scanningOptions.touchInputEnabled,
pointerEventsEnabled: scanningOptions.pointerEventsEnabled,
scanLength: scanningOptions.length,
layoutAwareScan: scanningOptions.layoutAwareScan,
preventMiddleMouse: scanningOptions.preventMiddleMouse.onSearchQuery,
Expand Down Expand Up @@ -2054,8 +2052,6 @@ export class Display extends EventDispatcher {
normalizeCssZoom: scanningOptions.normalizeCssZoom,
selectText: false,
delay: scanningOptions.delay,
touchInputEnabled: false,
pointerEventsEnabled: false,
scanLength: scanningOptions.length,
layoutAwareScan: scanningOptions.layoutAwareScan,
preventMiddleMouse: false,
Expand Down
Loading