mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
Fix mobile input prompt command selection (#148)
* fix mobile selection in suggestion dropdowns * handle mobile keyboard viewport
This commit is contained in:
1 parent
f368a2fa62
commit
a3237d7f7f
6 files changed
+61
-6
No files matched your search
@@ -56,7 +56,7 @@ export function CommandSuggestions({
|
||||
return (
|
||||
<div
|
||||
ref={listRef}
|
||||
className="absolute bottom-full left-0 right-0 mb-2 z-50 bg-background border border-border rounded-lg shadow-xl max-h-[30vh] md:max-h-[40vh] lg:max-h-[50vh] overflow-y-auto"
|
||||
className="absolute bottom-full left-0 right-0 mb-2 z-50 bg-background border border-border rounded-lg shadow-xl max-h-48 md:max-h-[40vh] lg:max-h-[50vh] overflow-y-auto"
|
||||
>
|
||||
{filteredCommands.map((command, index) => {
|
||||
const isSelected = index === selectedIndex
|
||||
@@ -65,6 +65,11 @@ export function CommandSuggestions({
|
||||
return (
|
||||
<button
|
||||
key={command.name}
|
||||
onMouseDown={(e) => e.preventDefault()}
|
||||
onTouchEnd={(e) => {
|
||||
e.preventDefault()
|
||||
onSelect(command)
|
||||
}}
|
||||
onClick={() => onSelect(command)}
|
||||
className={`w-full px-3 py-2 text-left transition-colors flex items-center gap-2 ${
|
||||
isSelected
|
||||
|
||||
Reference in new issue
Block a user