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

改变 element position 定位时 children 未重新定位 #1029

Closed
temper357 opened this issue Dec 28, 2021 · 0 comments · Fixed by #1033
Closed

改变 element position 定位时 children 未重新定位 #1029

temper357 opened this issue Dec 28, 2021 · 0 comments · Fixed by #1033
Assignees
Labels
bug Something isn't working

Comments

@temper357
Copy link
Contributor

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

main

重现步骤 | Steps To Reproduce

重现代码 | Code example:

  it('position change bug', async () => {
    let div;
    let item1;
    div = createElement(
      'div',
      {
        style: {
          position: 'relative',
          width: '200px',
          height: '100px',
          display: 'flex',
          flexDirection: 'row',
          backgroundColor: 'green',
        },
      },
      [
        (item1 = createElement('div', {
          style: {
            margin: '30px',
            width: '100px',
            height: '50px',
            backgroundColor: 'yellow',
          }
        }, [
            createElement('div', {
                style: {
                    position: 'absolute',
                    top: 0, 
                    left: 0,
                    width: '30px',
                    height: '30px',
                    backgroundColor: 'red'
                }
            })
        ])),
        
      ]
    );

    BODY.appendChild(div);

    setTimeout(() => {
      item1.style.position = 'relative';
    }, 2000);

    await snapshot();
  });

预期结果 | Expected results:
image

实际结果 | Actual results:
image

@temper357 temper357 added the bug Something isn't working label Dec 28, 2021
@temper357 temper357 self-assigned this Dec 28, 2021
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