PolymerElements / iron-input

An input with data binding
https://webcomponents.org/element/PolymerElements/iron-input
33 stars 45 forks source link

New default value (#130) breaks auto-validation of paper-input #134

Closed eidottermihi closed 6 years ago

eidottermihi commented 6 years ago

Description

The default value '' introduced in #130 seems to break the auto-validate behavior of paper-input, because paper-input assumes an initial value of undefined (see https://github.com/PolymerElements/paper-input/pull/616) to track if the value was changed by a user.

Expected outcome

Auto-validation should only trigger after the first value change initiated by a user.

Actual outcome

Auto-validation triggers immediately, e.g. required text inputs with no initial value are marked red and the error message shows.

Live Demo

with iron-input+v2.1.3 (current): https://codepen.io/eidottermihi/pen/jKOvOb with iron-input+v2.1.2 (before #130): https://codepen.io/eidottermihi/pen/jKOvPW

Steps to reproduce

  1. Put a paper-input element in the page with auto-validate and required and no initial value.
  2. Open the page in a web browser.

Browsers Affected

eidottermihi commented 6 years ago

Added two live demos showing the change in behavior.

notwaldorf commented 6 years ago

Fixed in #658