adopted-ember-addons / adopted-ember-addons/ember-paper

Use onfocus instead of onblur for paper-input

未关闭
#852 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
879
派生
327
PR 合并指标
30 天内没有已合并 PR

描述

Currently, `paper-input` set validation errors on blur, even though it should set validation errors on `isTouched`, which to many people means `focus`.

I want to open a discussion on if we can change this functionality to be `onfocus` instead of `onblur`, which actually does mean `isTouched`.

https://github.com/miguelcobain/ember-paper/blob/master/addon/components/paper-input.js#L157

One of the use-cases is a password field. A user will start entering a password, but not know it's invalid before blurring the field. If you hide or disable the submit button in the form until everything is valid, the user will be stuck in that input, and not know what to do. You would think that they would know to hit 'enter' to submit the form, which would trigger the validation error, but we user-tested a bunch of people and none of them knew to do that ... Having the validation message show up as they start typing would solve this issue.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。