-
Notifications
You must be signed in to change notification settings - Fork 47k
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 string values for capture attribute. #11424
Conversation
* Uses HAS_OVERLOADED_BOOLEAN_VALUE instead of HAS_BOOLEAN_VALUE * Allows for <input type="file" capture="user" /> Fixes #11419
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sending this out!
Did a couple of tests locally: it('...', () => {
var stub = ReactTestUtils.renderIntoDocument(<input capture={false} />);
var node = ReactDOM.findDOMNode(stub);
expect(node.getAttribute('capture')).toBe(null)
});
it('...', () => {
var stub = ReactTestUtils.renderIntoDocument(<input capture={true} />);
var node = ReactDOM.findDOMNode(stub);
expect(node.getAttribute('capture')).toBe('')
});
it('...', () => {
var stub = ReactTestUtils.renderIntoDocument(<input capture="user" />);
var node = ReactDOM.findDOMNode(stub);
expect(node.getAttribute('capture')).toBe('user')
});
it('...', () => {
var stub = ReactTestUtils.renderIntoDocument(<input capture />);
var node = ReactDOM.findDOMNode(stub);
expect(node.getAttribute('capture')).toBe('')
}); I think this is pretty safe for a minor. |
Ended up in a patch 😛 We cut releases from master now, so if something should only be merged for a minor, it is best to raise an issue and coordinate. Otherwise we lose the ability to cut quick patch fixes. But I'm okay treating this one as a patch tbh. |
Hehe. No problem. Sounds good! A patch sounds fine to me too. |
- the capture attribute changed in #11424 - changes to value/defaultValue handling of functions/Symbols are from #11534, but as per #11734 (comment) this is actually not a new problem so we're okay with it
* Uses HAS_OVERLOADED_BOOLEAN_VALUE instead of HAS_BOOLEAN_VALUE * Allows for <input type="file" capture="user" /> Fixes facebook#11419
<input type="file" capture="user" />
Fixes #11419