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 摘要。