uBlock/src
Rory O’Kane be111c4036
In Element Zapper, support Mac keyboards’ Delete key (#3770)
Override the Backspace key, not just the Delete key, as Mac keyboards have Backspace as the only delete key and label it Delete.

Source of key value: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values#Editing_keys

More background on Mac keyboard shortcuts: Mac keyboards can emulate Delete using fn+Delete, meaning Forward Delete, but Mac software does not use it except in text editing. When deletion is dangerous, Mac software requires holding a modifier key in conjuction with Delete, but I think it’s better to make deletion easy in this case.

This new binding has a potential downside: if the user Backspace key normally goes Back in history (which can differ across OSs and browsers), this will change the behavior to delete the selected element instead. If the user really wants to go back in history, they will have to press Escape to leave the mode and then press Backspace, or they will have to press an alternative keyboard shortcuts such as Alt+Left. I think the user will rarely want to go back in history in the middle of picking an element, though.

That downside could be mitigated by conditioning the key check on `runtime.PlatformOs` (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/PlatformOs). But that would complicate the code a lot compared to the importance of this feature, and such detection would still fail to capture the user’s intent accurately in all cases. I think it’s better to unconditionally accept both Backspace (Delete) and Delete (Forward Delete).
2020-02-28 14:28:00 -05:00
..
_locales Import translation work from https://crowdin.com/project/ublock 2020-02-27 09:58:55 -05:00
css Make row slightly taller on mobile 2020-02-27 10:01:09 -05:00
img Integrate bare-bone filter hit stats in the logger 2019-05-24 11:18:39 -04:00
js In Element Zapper, support Mac keyboards’ Delete key (#3770) 2020-02-28 14:28:00 -05:00
lib Fix page count computation in publicSuffixList.enableWASM() 2019-04-25 19:40:07 -04:00
web_accessible_resources Improve neutered Google Analytics replacement scriptlet 2019-12-01 10:40:05 -05:00
1p-filters.html Add a link to the remote asset in asset viewer 2019-05-23 19:29:59 -04:00
3p-filters.html Simplify client messaging code 2019-09-19 08:31:38 -04:00
about.html Select existing "Advanced settings" page if any 2019-05-25 08:31:06 -04:00
advanced-settings.html Add basic syntax coloring to advanced settings pane 2019-12-24 10:04:18 -05:00
asset-viewer.html Enforce no scrollbars on body element 2020-02-03 10:51:30 -05:00
background.html Work toward modernizing code base: promisification 2019-09-16 09:45:17 -04:00
cloud-ui.html fix https://github.com/uBlockOrigin/uBlock-issues/issues/171 2018-08-31 10:50:19 -04:00
dashboard.html Warn when navigating away from pane with unsaved changes 2019-05-19 15:35:00 -04:00
document-blocked.html Further fine tune layout for small screen devices; use SVG for icon 2018-12-21 08:16:24 -05:00
dyna-rules.html Use type="search" for search input fields 2019-11-03 13:14:29 -05:00
epicker.html Allow element picker dialog to be moved around 2019-11-05 12:03:48 -05:00
logger-ui.html Fine tune hostname uncloaking through CNAME-lookup 2019-11-23 13:07:23 -05:00
popup-fenix.html Move refresh button to the right of the power button 2020-02-27 09:29:14 -05:00
popup.html New way to convey IDN and CNAME info in popup panel 2020-02-10 08:06:36 -05:00
settings.html Grand refactoring of the logger 2019-01-12 16:36:20 -05:00
shortcuts.html fix https://github.com/uBlockOrigin/uBlock-issues/issues/106 2018-07-18 18:00:55 -04:00
whitelist.html Add a link to the remote asset in asset viewer 2019-05-23 19:29:59 -04:00