You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -137,12 +110,15 @@ function AutocompleteEntry({
137
110
className={className}
138
111
// using click events for mouse interaction and touch end to select an entry.
139
112
onClick={()=>onSelect()}
113
+
// minor workaround to improve success rate for click even if start and end location on screen are slightly different
140
114
onTouchEnd={e=>{
141
115
e.preventDefault()// do not forward click to underlying component
142
116
onSelect()
143
117
}}
144
118
onMouseDown={e=>{
145
-
e.preventDefault()// prevent blur event for our input, see #398
119
+
// prevents that input->onBlur is called when clicking the autocomplete item (focus would be lost and autocomplete items would disappear before they can be clicked)
120
+
// See also the onMouseDown calls in the buttons in AddressInput.tsx created for the same reason.
Copy file name to clipboardExpand all lines: src/sidebar/search/Search.tsx
-9Lines changed: 0 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -101,13 +101,6 @@ const SearchBox = ({
101
101
})=>{
102
102
constpoint=points[index]
103
103
104
-
// With this ref and tabIndex=-1 we ensure that the first 'TAB' gives the focus the first input but the marker won't be included in the TAB sequence, #194
105
-
constmyMarkerRef=useRef<HTMLDivElement>(null)
106
-
107
-
useEffect(()=>{
108
-
if(index==0)myMarkerRef.current?.focus()
109
-
},[])
110
-
111
104
functiononClickOrDrop(){
112
105
onDropPreviewSelect(-1)
113
106
constnewIndex=moveStartIndex<index ? index+1 : index
0 commit comments