Skip to content

Commit c99ce56

Browse files
committed
No more custom context menu on whole search bar (#904)
Also tiny opacity animation for search bar buttons
1 parent 5632b0c commit c99ce56

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/scripts/features/contextmenu.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ export function openContextMenu(event: Event): void {
7777
main: !!target.closest(sectionMatching.main.section),
7878
quotes: !!target.closest(sectionMatching.quotes.section),
7979
pomodoro: !!target.closest(sectionMatching.pomodoro.section),
80-
searchbar: !!target.closest(sectionMatching.searchbar.section),
80+
// allows context menu on whole search bar except input (to allow for native paste)
81+
searchbar: !!target.closest(sectionMatching.searchbar.section) && !target.closest('#searchbar'),
8182
notes: !!target.closest(sectionMatching.notes.section),
8283
},
8384
interface: target.matches('main#interface') || target.matches('body'),

‎src/styles/features/searchbar.css‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@
7373
display: flex;
7474
opacity: 0;
7575
visibility: hidden;
76+
transition: opacity 0.1s, visibility 0.1s;
77+
transition-behavior: allow-discrete;
7678
}
7779

7880
#sb-buttons.shown {

0 commit comments

Comments
 (0)