Support string values for capture attribute.#11424
Merged
nhunzaker merged 1 commit intofacebook:masterfrom Nov 12, 2017
maxschmeling:master
Merged
Support string values for capture attribute.#11424nhunzaker merged 1 commit intofacebook:masterfrom maxschmeling:master
nhunzaker merged 1 commit intofacebook:masterfrom
maxschmeling:master
Conversation
* Uses HAS_OVERLOADED_BOOLEAN_VALUE instead of HAS_BOOLEAN_VALUE * Allows for <input type="file" capture="user" /> Fixes #11419
nhunzaker
approved these changes
Nov 12, 2017
Contributor
nhunzaker
left a comment
There was a problem hiding this comment.
Thanks for sending this out!
Contributor
|
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. |
Collaborator
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. |
Contributor
|
Hehe. No problem. Sounds good! A patch sounds fine to me too. |
This was referenced Nov 13, 2017
gaearon
added a commit
that referenced
this pull request
Dec 1, 2017
- 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
Ethan-Arrowood
pushed a commit
to Ethan-Arrowood/react
that referenced
this pull request
Dec 8, 2017
* Uses HAS_OVERLOADED_BOOLEAN_VALUE instead of HAS_BOOLEAN_VALUE * Allows for <input type="file" capture="user" /> Fixes facebook#11419
This was referenced Feb 2, 2018
This was referenced Mar 1, 2018
This was referenced Mar 21, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
<input type="file" capture="user" />Fixes #11419