Skip to content

Support editable input types from HTML5#1502

Merged
veged merged 3 commits intobem:v4from
a-lexxx:issues/1501@v4
Jun 16, 2017
Merged

Support editable input types from HTML5#1502
veged merged 3 commits intobem:v4from
a-lexxx:issues/1501@v4

Conversation

@a-lexxx
Copy link
Contributor

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

Suggestion for #1501

cc @tadatuta

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.

4 participants