Feature: Move affixes
Description
Closes #14873
This seems like the simplest way to "move" the affixes. When clicking on a prefix/suffix, find the nearest container container with ".fi-input-wrp", and focus on the input. Let me know if you think there is a simpler way.
Visual changes
none
Functional changes
- [x] Code style has been fixed by running the
composer cscommand. - [x] Changes have been tested to not break existing functionality.
- [x] Documentation is up-to-date.
For clarity, this only works with TextInput. Do we need this to work with other components as well? For example, Select and ColorInput? If so, when it focuses, do we want the dropdown to open (for Select) and the popup to select color (for ColorPicker)? Then I have to change my approach.
I think Zep might mean that the input size actually increases and the affixes become click-through, so this will likely depend on his review
I think Zep might mean that the input size actually increases and the affixes become click-through, so this will likely depend on his review
Yes that's exactly what I meant, though then we might have to calculate the input size (padding to account for affixes) dynamically based on the affix size.
I think the current approach in this PR also has issues when used with affix actions? When action click events bubble up and aren't stopped, they will trigger focus on the input element.
Hi, I am closing this as I think it is quite far away from what Zep was looking for in the original issue