Failed to execute "setPosition": Unsupported unit 'auto'
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18.9k
- Forks
- 1.6k
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Report
- I have searched existing issues and this is not a duplicate
Issues and Steps to Reproduce
There is no way to unset position (in the JavaScript version 1.9.3) because setPositionAuto is not a function even though it is being patched to support 'auto' as a value:
https://github.com/facebook/yoga/blob/master/javascript/sources/entry-common.js#L242
Expected Behavior
I expect to be able to call setPosition(EDGE_TOP, 'auto') or setPositionAuto(EDGE_TOP)
Actual Behavior
Error: Failed to execute "setPosition": Unsupported unit 'auto'
Link to Code
If you have some code that maintainers can clone/test for themselves, bugs can be resolved much faster. Please paste a link here.
When applicable, use this fiddle to post a web repro.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in javascript/sources/entry-common.js around line 242, where support for the 'auto' value is patched. Reproduce the issue with the JavaScript API using setPosition(EDGE_TOP, 'auto') and check whether setPositionAuto is available. Done means either call accepts 'auto' or the corresponding setPositionAuto API works without the unsupported-unit error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100