input readonly list-attribute
See original GitHub issueFails in rendering an input with attribute ‘list’ user for targeting datalist-element Removing the attribute renders both input and datalist elements, then unconnected and useless of course.
Console message: Cannot assign to read only property ‘list’ of object ‘#<HTMLInputElement>’ at setElementData…
Reproduced in glitch https://glitch.com/edit/#!/wry-autocomplete
import { h, app } from 'hyperapp' // 0.7.1
// import {h, app} from '../hyperapp/index' // 0.8.0, unreleased
const dataList = () =>
<datalist id='browsers'>
<option value='Chrome'></option>
<option value='Firefox'></option>
<option value='Internet Explorer'></option>
<option value='Opera'></option>
<option value='Safari'></option>
<option value='Microsoft Edge'></option>
</datalist>
const view = () =>
<div class='container'>
<label>Choose a browser from this list:
<input list='browsers' /></label>
{dataList()}
</div>
app({view})
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
HTML input readonly Attribute - W3Schools
The readonly attribute is a boolean attribute. When present, it specifies that an input field is read-only. A read-only input field cannot be...
Read more ><input>: The Input (Form Input) element - HTML
The <input> HTML element is used to create interactive controls for web-based forms in order to accept data from the user; a wide...
Read more >input type=file – file upload control - HTML5
The input element with a type attribute whose value is " file " represents a list of file ... readonly attribute HTMLElement list;...
Read more >allow aria-readonly on input type=text with role=combobox #324
You can see that I had aria-readonly on the input, but this raised the validation error as I wasn't using a list attribute....
Read more >HTML Input Attributes - Dofactory
HTML input attributes -- the best examples. Specifies the initial value for an input field. ... readonly, readonly, Make input read only.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yup. I can confirm that it works as expected now. Good work! Updated to 0.8.1 https://glitch.com/edit/#!/wry-autocomplete (Heads up: Glitch is a bit quirky/slow for me atm)
@marcusasplund I think this is fixed in >=0.8.1. Can you give it a shot? 🙏