Commit graph

16 commits

Author SHA1 Message Date
Mikko Koski
98fd29f92a Fix autocomplete click issue. Listen mouse down instead of click
This commit fixes click issue in the autocomplete predictions list. The previous implementation relied on two event: blur event from the input and click even from the predictions list. Blur event happens before click event and because of this there was a listener to listen the current hover status. However, this strategy doesn't work in touch devices where there's no hovers.

The fix is to listen mousedown/mouseup (and touchstart/touchend) events and save the current "in progress" state to the component state.
2017-05-19 10:52:03 +03:00
Vesa Luusua
aa538a2eae Add autoFocus to wizard input fields 2017-05-12 17:10:30 +03:00
Kimmo Puputti
4341cd629d Use Input component in LocationAutocompleteInput 2017-03-29 11:09:48 +03:00
Kimmo Puputti
cc40a76c69 Temporarily remove using Input since the ref setting fails 2017-03-24 12:10:00 +02:00
Mikko Koski
69f342443f Merge pull request #91 from sharetribe/input-component
Add Input component
2017-03-24 11:30:14 +02:00
Mikko Koski
4c7c1ceeac Add Input component 2017-03-24 10:59:50 +02:00
Kimmo Puputti
fa433264f5 Improve place selection
- Auto-select only when a selection is not started (place id not
   stored)
 - Select place when pressing tab
2017-03-24 10:04:37 +02:00
Kimmo Puputti
eb28f91f02 Don't try to select place in blur event
The blur event is triggered before the click event to the predictions
list, overriding whatever the user selects.
2017-03-24 10:04:37 +02:00
Kimmo Puputti
a501cbde9a Document why predictions hover checking is needed 2017-03-24 10:04:37 +02:00
Kimmo Puputti
748e772173 Remove native autocomplete 2017-03-24 10:04:37 +02:00
Kimmo Puputti
a8990f0105 Use classnames package 2017-03-23 10:42:37 +02:00
Kimmo Puputti
a224626fcf Make a proper location search from landing page 2017-03-22 14:46:55 +02:00
Kimmo Puputti
48095242ba Add name to the location autocomplete input for better snapshots 2017-03-21 10:49:59 +02:00
Kimmo Puputti
42b6fcfd96 Improve LocationAutocompleteInput
- call onFocus/onBlur properly to set the `touched` flag correct for
   validation messages
 - Attempt to select a location if the user moves to another field
   within a form
 - Remove special handling for ESC
2017-03-20 14:52:41 +02:00
Kimmo Puputti
cfab06d813 Don't print trailing comma in fn args since it breaks in Node 2017-03-15 15:54:49 +02:00
Kimmo Puputti
e15614877e LocationAutocompleteInput 2017-03-10 09:01:18 +02:00