Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support editable input types from HTML5 #1502

Merged
merged 3 commits into from
Jun 16, 2017
Merged

Conversation

a-lexxx
Copy link
Contributor

@a-lexxx a-lexxx commented Apr 29, 2017

Suggestion for #1501

cc @tadatuta

@@ -86,7 +86,9 @@ provide(/** @exports */{
switch(domNode.tagName.toLowerCase()) {
case 'input':
var type = domNode.type;
return (type === 'text' || type === 'password') && !domNode.disabled && !domNode.readOnly;
var editableInputTypes = ['date', 'datetime-local', 'month', 'number', 'password',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codestyle requires to join var declarations

return (type === 'text' || type === 'password') && !domNode.disabled && !domNode.readOnly;
var editableInputTypes = ['date', 'datetime-local', 'month', 'number', 'password',
'search', 'tel', 'text', 'time', 'url', 'week'];
return (editableInputTypes.indexOf(type) >= 0) && !domNode.disabled && !domNode.readOnly;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need in brackets

@a-lexxx
Copy link
Contributor Author

a-lexxx commented Apr 30, 2017

/up

@coveralls
Copy link

Coverage Status

Coverage remained the same at 62.41% when pulling 60e1202 on stochastical:issues/1501@v4 into c924d56 on bem:v4.

Copy link
Member

@tadatuta tadatuta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@veged veged merged commit 4bf5ed0 into bem:v4 Jun 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants