aminomancer / uc.css.js

A dark indigo CSS theme for Firefox and a large collection of privileged scripts to add new buttons, menus, and behaviors and eliminate nuisances. The theme is similar to other userChrome stylesheets, but it's intended for use with an autoconfig loader like fx-autoconfig, since it uses JavaScript to implement its more functional features.
Other
329 stars 27 forks source link

Arrow keys in urlbar provide inconsistant behavior. #23

Closed KleinByte closed 2 years ago

KleinByte commented 2 years ago

Describe the bug When a user presses left or right arrows in the urlbar/navbar, the browser switches between search engines/history,etc... albeit very randomly and seemingly unintended.

To Reproduce Steps to reproduce the behavior: 1.Have multiple search engines/history/tabs search integrated into the urlbar.

  1. Have a url in the navbar.
  2. Try to use the arrowkeys to navigate to a certain part in the url
  3. likewise, try to use the right arrowkey to activate an autocomplete suggestion given to you.

Expected behavior Prior expected behavior would be that left and right arrows stay native to navigation through characters/autocomplete and up/down arrows change search engine. Additionally I believe alt + left,right arrows should change search engine.

Screenshots IGJRiTHb4S

Desktop (please complete the following information):

Additional context

I've seen your commits regarding this situation and I believe you may be still working on this. I'm not sure, also maybe this issue has something to do with my extensions/settings.

aminomancer commented 2 years ago

Which scripts are you using? If you're using oneClickOneOffSearchButtons.uc.js do you have any of the prefs set for that script? It seems like it's due to userChrome.urlbar.oneOffs.keyNavigation. This is a pref that I made by request about a year ago and haven't used or tested since. I will try and figure out why it stopped working, but in the meantime I'd advise just disabling the pref. Firefox isn't really designed to support left/right arrow key navigation through urlbar results, it's just a feature I added since a lot of users were complaining when mozilla removed an optional pref that implemented this feature.

aminomancer commented 2 years ago

Okay I think I have fixed this issue. Please download v1.8.0 of oneClickOneOffSearchButtons.uc.js and v1.3.0 of scrollingOneOffs.uc.js. I did some research to ascertain the cause. It was actually a mistake some firefox contributor made but kind of a long story. Anyway from my testing I'm pretty sure I fixed it, and made some improvements also.

Btw, I updated the stylesheets to make that giant oversized urlbar result in your gif look more normal, but if you wanna get rid of it altogether, you can set browser.urlbar.tabToSearch.onboard.interactionsLeft to 0 in about:config. You can also set browser.urlbar.suggest.engines to false but that'll get rid of the regular-sized search engine suggestions too. Personally I set both of these to false too: browser.urlbar.richSuggestions.tail and browser.urlbar.searchTips

aminomancer commented 2 years ago

Btw if you want your search engine icons to match the theme, you can copy some of mine. I wanted to make extensions for all of them but there's a bug in AMO's parser. It can't accept url query parameters from a localized message, it just returns some error which prevents you from signing it. But it doesn't stop you from installing them. If you set xpinstall.signatures.required to false in about:config, you can go to about:addons and click the gear button > install addon from file... and choose one of the zip files in the theme's extensions > search-extensions folder. They'll be unsigned but work completely as normal. You can also add your own addons with this addon which is how I add most of mine. Engines made that way should be basically identical to engines added by an extension, except they can't be localized. That said, some of those look like engines I should already be replacing the icons for. So maybe I'm getting the ID wrong or something. If you can send me links to all the search engine extensions you use, or whatever else they are, I can add vector icons for them.