fixes#10319: when a relation membership role is edited, the change will trigger a redraw of the combobox (via D3 exit/enter). In this case, the `blur` event is never called, because the input element is immediately removed from the DOM. This is solved by cleaning up the dropdown when the combobox is about to be removed from the page.
fixes a bug where in case multiple items with the same `value` are present in the combobox' dropdown, always the first one is returned in the `accept` event
fixes#9898
Fixes a problem that occurs because the order of the field `options`
can be in general different from the order returned by taginfo
(taginfo sorts by usage, while presets typically are sorted alphabetically),
causing different values to be potentially selected for autocomplete values.
As the taginfo results typically come in a few moments delayed, this can
lead to confusing behaviour.
This solves it by just not reattempting an autocomplete using the taginfo
results, if a field has static options available.
as it silently strips non-numeric suffixes (e.g. a value of "123 foo" is transformed into a numeric value of 123 by `parseFloat`, which is typically not what we desire)
* pressing return/enter doesn't deselect the entity anymore
* predefined ("static") field options are always listed in the combobox dropdown, even if taginfo doesn't include them (because of low usage)
* (raw) tag values can also be entered for localized strings
* static localized strings can be used before taginfo response is received (useful when taginfo is slow or unavailable)
* fixes some bugs which can be triggered when taginfo is slow
* fixes a bug where the autocomplete dropdown doesn't work properly when tags have "few" values
* multiCombo fields can be case-sensitive now
Update `text` functions to `html` to support inserting the `span` elements
Specify `html: false` for various instances where a `span` is not desired, e.g. `placeholder` and `title` attributes
Add terms property to fields
Make terms translatable for searchable fields
Account for fields' terms and keys when filtering with the Add field menu (close#5763)
(closes#5847)
- removed the stopPropagation from the combobox keydown handler
to make sure that the raw_tag_editor keydown handler will run
- increased timeout from 1ms to 10ms for Firefox
This is related to Firefox's newish time budgeting approach that they
started using around Firefox 55. As a result, very fast timers (<4ms?)
may run synchronously instead of yielding and running asynchronously
https://blog.wanderview.com/blog/2017/03/13/firefox-52-settimeout-changes/
(note similar code in ui/fields/combo.js to delay focus changes and
redraws 10ms after the tag changes and other events have completed)
(closes#5769)
This change allows pointer events to flow to the caret, and forwards
them back to the combo input. Also renames several event handlers
for clarity, and increases the double-click detection threshold.
(re: #5637, re: #5618)
This can happen if the user enters a value that is not matched to
one of the combo suggestions.
Also make sure to set `this` to the input field. It might not be
already if the event was triggered from a keypress instead of a click.
(closes#5722, re: #5637, re: #5618)
dispatched with a value() string instead of a datum, which
causes issues for code expecting a datum always.
(such as localized.js brand picker or "Add Field" combo)
Fix for this coming in next commit.
(closes#4900, closes#5449)
Some browsers need an explicit `change` event triggered on the input field
when a value has been changed by the combo and accepted by pressing return
or tab. This was only an issue on combos that aren't part of uiFields,
since the uiFields are all setup to respond to `change`,`input`,`blur` etc.
(closes#5568)
Several strategies in here:
- Move uiCombobox() from inside the render function to class variable
- Don't render stuff like the raw tag editor when it's collapsed
- Don't show as many fields/combos on hover
- Don't instantiate fields (like universal/more) until they're actually shown
- Bind the combo on enter selection not on update selection
(closes#5575)
Also improves keyboard navigation, and adds some scrollintoview
workarounds to make sure that the selected option is visible
while also not causing the whole page to move.