ember.js: {{input}} helper doesn't accept arbitrary attributes.
Well, it accepts them and silently ignores them instead of passing them through as attributes to the compiled HTML.
So in HTML5 we have the following valid attributes: type, accept, accesskey, autocomplete, autofocus, autosave, checked, disabled, form, formaction, formmethod, formnovalidate, formtarget, height, inputmode, list, max, maxlength, min, multiple, name, pattern, placeholder, readonly, required, selectionDirection, size, spellcheck, src, step, tabindex, usemap, value and width.
Then we also have a bunch of browser-proprietary attributes like x-moz-errormessage.
Currently the {{input}} helper only accepts the following attributes: value, size, name, pattern, placeholder, disabled, maxlength and tabindex.
Ideally I’d like to make the input helper simply pass through any hash arguments it gets as attributes, however if that’s not acceptable let’s at least whitelist the valid HTML5 attributes?
If I can get some feedback on this then I’ll start working on PR.
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 15 (14 by maintainers)
Also, for those interested we have taken another shot at getting these attributes working out of the box in https://github.com/emberjs/ember.js/pull/4257.