Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does HTML 5 not have editable combobox or local menus built in? [closed]

People also ask

How do I make a ComboBox editable?

The ComboBox class has a method known as editable (boolean), which specifies whether the current Combobox allows user input. You can set the value to this property using the setEditable() method. Therefore, to edit a JavaFX ComboBox invoke the setEditable() method on it by passing the boolean value true as a parameter.

How do I add a ComboBox in HTML?

Introduction to Combobox in HTMLIt is formed with select element and input type=”text” element. The functionality of the Combobox is as same as a select tag. It's also having a <option>tag attribute within the <select >tag to select the menu option from the list so one can choose an option as per their choice.

How do you make an input field editable in HTML?

Answer: Use the HTML5 contenteditable Attribute You can set the HTML5 contenteditable attribute with the value true (i.e. contentEditable="true" ) to make an element editable in HTML, such as <div> or <p> element.

How do I edit a dropdown in HTML?

HTML) Use any element to open the dropdown content, e.g. a <span>, or a <button> element. Use a container element (like <div>) to create the dropdown content and add whatever you want inside of it. Wrap a <div> element around the elements to position the dropdown content correctly with CSS.


Actually, an editable combobox or just combobox can be created using the new list attribute on the input element. It points to a datalist element that can provide a list of predefined options:

<input list=languages>
<datalist id=languages>
 <option value="English"></option>
 <option value="Dutch"></option>
</datalist>

For menus the old menu element has been reused.

You can use at least datalist in IE >=10, Firefox >=37, Chrome >= 39, Opera >= 29. Data from caniuse datalist. About menu element, only Firefox seems to have a partial support for it.


The state of form and input controls on in browsers is a big mess in general.

  • There's no consistency to implementation. Some use OS native controls (Safari), some use bespoke controls (Opera), and some use a mix of both (IE)
  • Because of the above, styling/branding a form is not reliable
  • Again because of the above, we suffer(ed) with z-index issues.
  • Even on browsers where you can apply style, it's inconsistent. Ever add a CSS border to input only to see squares around your radio buttons?

In general, I tend to agree with you. We've been living with the same form controls since HTML 3. So us web developers are left to create more rich and advanced controls on our own. And while these can work, they rely heavily on DHTML and can have significant usability implications.

It would be nice to see advancement in this area.


these are easily doable with JavaScript, <audio> and <video> (and <canvas>!) aren't.

Relying on JavaScript libraries are not a bad thing. If the browser did all, every webpage would look the same.