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

flex item 的 child 高度变化时 flex container 的高度未跟随变化 #1224

Closed
temper357 opened this issue Mar 17, 2022 · 0 comments · Fixed by #1229
Closed

flex item 的 child 高度变化时 flex container 的高度未跟随变化 #1224

temper357 opened this issue Mar 17, 2022 · 0 comments · Fixed by #1229
Assignees
Labels
bug Something isn't working

Comments

@temper357
Copy link
Contributor

使用的 Kraken 版本 | What version of kraken are you using

main

重现代码 | Code example:

  it('should work with value change to empty string', async (done) => {
    let div;
    let child;
    let item;
    div = createElement(
    'div',
      {
        style: {
          display: 'flex',
          backgroundColor: 'grey',
          padding: '10px'
        },
      },
      [
        (createElement('div', {
          style: {
            width: '50px',
            height: '100px',
            backgroundColor: 'yellow',
          }
        })),
        (child = createElement('div', {
          style: {
            flexGrow: 1,
            backgroundColor: 'green',
          }
        }, [
            (item = createElement('div', {
                style: {
                    height: '100px',
                    backgroundColor: 'coral',
                }
            }, [
            ]))
        ])
        )
      ]
    );

    document.body.appendChild(div);
    
    requestAnimationFrame(async () => {
      item.style.height = '150px';
      await snapshot();
      done();
    });
  });

预期结果 | Expected results:
image

实际结果 | Actual results:
image

@temper357 temper357 added the bug Something isn't working label Mar 17, 2022
@temper357 temper357 self-assigned this Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant