Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
ComboBox needs some love
There are a few issues with ComboBox that need attention.
1) iOS 8.4.1 has broken Vaadin ComboBoxes. This ticket and this ticket are probably reporting the same thing. This discussion on the Apple forums might provide clues - some aspects of dropdown menus and css conflicting... As there is no going back from 8.4.1 now, this could be a long-term outage for one of my UIs should a user upgrade from iOS 8.4. And 8.4 shows users regular dialog boxes begging to be upgraded... Maybe this requires an Apple solution, but any work-around would be appreciated.
2) A nuisance has crept in where the value change listener doesn't work properly. In my app, using tab to exit a combobox after making a change fires the value change listener, but clicking outside the combobox doesn't. I'm getting regular complaints from users. This bug needs some attention but seems to be unattended.
3) Roadmap: There are long-requested enhancements that could be made. Specifically, it would be nice to apply CSS styles to individual items. Is there a future for ComboBox that might provide for such enhancements?
1) Thanks for pointing out those bug reports. I’m right now update my iPhone to 8.4.1 and trying it out myself. Can’t promise a fix, but I’ll see what I can find out.
2) What was the previous behavior, I can’t remember. So if you select a value using the keyboard from the dropdown list, without actually pressing the Enter key, and click outside the popup, the value isn’t actually selected? Or just that the listener is not fired, but the UI shows the new selection?
3) Can’t say much about the current combo box in the Framework, but we’re currently working on a replacement component as a Polymer web component (part of the new upcoming Vaadin Components package), which will be a purely client side component. If you have some other specific features in mind, please share. Otherwise I can dig up any open issues from Trac.
The focus behavior is also problematic sometimes, especially when the ComboBox is on a Window.
I do not want the Window scroll position to change. Is it possible to disable this behavior?
1) I think you'll find the ComboBox non-functional using 8.4.1. Selection is impossible. I suspect the fix might require an Apple change, but comments by developers at the Apple developer's link above indicate some of them have had success repairing their dropdown components by modifying shadow-related CSS.
2) Expected/previous behaviour: After data is entered which highlights a unique item, that item would be selected and fire the value change listener when focus is removed from the ComboBox. Presently, the value change listener is correctly fired when tab is pressed (focus transferred to the next component) but if the user makes a selection then clicks outside the ComboBox the selection is lost and the value change listener does not fire. The bug report may contain a further use-case problem seen by that report's author.
3) Thanks - from my persepctive it would be handy to be able to style ComboBox items on the fly. For example, colours could be used to provide visual cues of item's belonging to similar categories. Or colored red/made bold etc. to provide a warning...
1) iOS 9 has re-established proper operation of the ComboBox. So the problem was with 8.4.1 only so looks to be purely an Apple problem.
3) Solved by Vaadin 7.5.6. Thanks Leif and everyone involved in adding ItemStyleGenerator to ComboBox.