Skip to content
Permalink
Browse files

fix: do not repove style attribute from inputs (#1545)

  • Loading branch information...
limonte committed Apr 13, 2019
1 parent 541f6e8 commit cf4453171986186e147771f3d0ef624fabd4e60e
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/utils/dom/renderers/renderInput.js
@@ -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++) {
@@ -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)
}
}

0 comments on commit cf44531

Please sign in to comment.
You can’t perform that action at this time.