Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[combo-box] Clicking inside the bounding-box but outside of the actual combobox triggers the dropdown #1250

Closed
1 of 7 tasks
ankon opened this issue Jul 19, 2019 · 3 comments
Closed
1 of 7 tasks
Labels

Comments

@ankon
Copy link

ankon commented Jul 19, 2019

Description

When clicking onto the adjacent label or the area next to it the combobox still triggers the dropdown.
When hovering over the adjacent label or the area next to it the combobox still gets hover effects.

Expected outcome

I would expect that the dropdown is only triggered when the user clicks on the actual input. Similarly the hover effects should only trigger when one actually hovers over the input.

Actual outcome

When clicking onto the adjacent label or the area next to it the combobox still triggers the dropdown.
When hovering over the adjacent label or the area next to it the combobox still gets hover effects.

Live Demo

https://friendly-glasses.glitch.me/ (standard demo with a label and a border to show the area)

Steps to reproduce

  1. Put a vaadin-combo-box element in the page.
  2. Open the page in a web browser.
  3. Hover over and click the area outside of the input of vaadin-combo-box element.

Browsers Affected

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE 11
  • iOS Safari
  • Android Chrome
    (didn't test the other ones)
@Haprog
Copy link
Contributor

Haprog commented Jul 30, 2019

I see your point, but I think it probably works as intended so far. We could discuss if we want to change that behaviour.

I do think it's slightly weird as it is now. I might personally prefer if by clicking the label it would only focus the text field of the combo box (in the same way as if you keyboard navigate to it via tab) and so that the hover styles for combo box would only show when hovering over the text field (not label or surrounding area).

@jouni What do you think about this? Is it working as intended atm. and/or would we want to change it?

@jouni
Copy link
Member

jouni commented Aug 5, 2019

I have considered the hover styles in the past as well, that it would be nicer to show those only when hovering over the input field.

Though, the label has its own hover style as well, so that should then probably only be applied when hovering over the label.

Not sure about changing the dropdown behavior. I think it might be confusing if it behaves differently depending on if you click the label of the field itself. But I think it would be a good experiment to try, see how it feels.

I might even go as far as only opening the dropdown when typing in the field or clicking the toggle button explicitly (more traditional combo box behavior).

@vaadin-bot vaadin-bot transferred this issue from vaadin/vaadin-combo-box May 19, 2021
@web-padawan web-padawan changed the title Clicking inside the bounding-box but outside of the actual combobox triggers the dropdown [combo-box] Clicking inside the bounding-box but outside of the actual combobox triggers the dropdown May 28, 2021
@web-padawan
Copy link
Member

This should be covered by #3402 where the logic was changed to only open dropdown on clicking label or input field, but not helper text / error message. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants