Skip to content

Commit

Permalink
fix: do not repove style attribute from inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
limonte committed Apr 13, 2019
1 parent 2dc387e commit 7f1d4e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/dom/renderers/renderInput.js
Expand Up @@ -5,7 +5,7 @@ import privateProps from '../../../privateProps.js'

export const renderInput = (instance, params) => {
const innerParams = privateProps.innerParams.get(instance)
const rerender = !innerParams || params.type !== innerParams.type
const rerender = !innerParams || params.input !== innerParams.input
const content = dom.getContent()
const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']
for (let i = 0; i < inputTypes.length; i++) {
Expand Down Expand Up @@ -38,7 +38,7 @@ export const renderInput = (instance, params) => {
const removeAttributes = (input) => {
for (let i = 0; i < input.attributes.length; i++) {
const attrName = input.attributes[i].name
if (attrName !== 'type' && attrName !== 'value') {
if (!['type', 'value', 'style'].includes(attrName)) {
input.removeAttribute(attrName)
}
}
Expand Down

0 comments on commit 7f1d4e2

Please sign in to comment.