detached 2de1562

find/omnibox: fully restore opacity when typing or refocusing input; also on input click/mousedown and root hover

commit
2de1562cbcc082228a12c04a6fa4ae0cdf8df23c
author
bamen · · 2025-09-09 18:06 UTC
committer
bamen · · 2025-09-09 16:51 UTC
parent
d5a4bab
signature
unsigned
1 file · +6 -2
M pkg/webkit/ucm_js_cgo.go +6 -2
@@ -104,7 +104,7 @@ func getOmniboxScript() string {
104104 box.addEventListener('mousedown', (e)=>{ e.stopPropagation(); }, true);
105105 // Focus and select input on hover for quick typing
106106 input.addEventListener('mouseenter', ()=>{ if (H.visible) { try { input.focus({preventScroll:true}); input.select(); } catch(_) { input.focus(); } } });
107- root.addEventListener('mouseenter', ()=>{ if (H.visible) { try { input.focus({preventScroll:true}); } catch(_) { input.focus(); } } });
107+ root.addEventListener('mouseenter', ()=>{ if (H.visible) { try { input.focus({preventScroll:true}); } catch(_) { input.focus(); } H.setFaded(false); } });
108108 // Clear fading when user goes back to input typing
109109 input.addEventListener('focus', ()=> H.setFaded(false));
110110 input.addEventListener('keydown', (e)=>{
@@ -136,9 +136,13 @@ func getOmniboxScript() string {
136136 H.scrollListToSelection();
137137 if (H.mode==='find') { H.revealSelection(); H.setFaded(true); }
138138 }
139+ } else {
140+ if (H.mode==='find') H.setFaded(false);
139141 }
140142 });
141- input.addEventListener('input', ()=> H.onInput());
143+ input.addEventListener('input', ()=> { H.onInput(); if (H.mode==='find') H.setFaded(false); });
144+ input.addEventListener('mousedown', ()=> H.setFaded(false));
145+ input.addEventListener('click', ()=> H.setFaded(false));
142146 H.el = root; H.input = input; H.list = list; H.selectedIndex = -1; H.paintList();
143147 },
144148 onInput(){
@@ -104,7 +104,7 @@ func getOmniboxScript() string {
104 box.addEventListener('mousedown', (e)=>{ e.stopPropagation(); }, true);104 box.addEventListener('mousedown', (e)=>{ e.stopPropagation(); }, true);
105 // Focus and select input on hover for quick typing105 // Focus and select input on hover for quick typing
106 input.addEventListener('mouseenter', ()=>{ if (H.visible) { try { input.focus({preventScroll:true}); input.select(); } catch(_) { input.focus(); } } });106 input.addEventListener('mouseenter', ()=>{ if (H.visible) { try { input.focus({preventScroll:true}); input.select(); } catch(_) { input.focus(); } } });
107- root.addEventListener('mouseenter', ()=>{ if (H.visible) { try { input.focus({preventScroll:true}); } catch(_) { input.focus(); } } });107+ root.addEventListener('mouseenter', ()=>{ if (H.visible) { try { input.focus({preventScroll:true}); } catch(_) { input.focus(); } H.setFaded(false); } });
108 // Clear fading when user goes back to input typing108 // Clear fading when user goes back to input typing
109 input.addEventListener('focus', ()=> H.setFaded(false));109 input.addEventListener('focus', ()=> H.setFaded(false));
110 input.addEventListener('keydown', (e)=>{110 input.addEventListener('keydown', (e)=>{
@@ -136,9 +136,13 @@ func getOmniboxScript() string {
136 H.scrollListToSelection();136 H.scrollListToSelection();
137 if (H.mode==='find') { H.revealSelection(); H.setFaded(true); }137 if (H.mode==='find') { H.revealSelection(); H.setFaded(true); }
138 }138 }
139+ } else {
140+ if (H.mode==='find') H.setFaded(false);
139 }141 }
140 });142 });
141- input.addEventListener('input', ()=> H.onInput());143+ input.addEventListener('input', ()=> { H.onInput(); if (H.mode==='find') H.setFaded(false); });
144+ input.addEventListener('mousedown', ()=> H.setFaded(false));
145+ input.addEventListener('click', ()=> H.setFaded(false));
142 H.el = root; H.input = input; H.list = list; H.selectedIndex = -1; H.paintList();146 H.el = root; H.input = input; H.list = list; H.selectedIndex = -1; H.paintList();
143 },147 },
144 onInput(){148 onInput(){

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close