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

fix(engine): bail retargeting if target is detached #679

Merged
merged 1 commit into from
Sep 27, 2018

Conversation

ekashida
Copy link
Member

Details

Return the original target if we are not able to retarget due to DOM mutations.

Does this PR introduce a breaking change?

  • Yes
  • No

@ekashida ekashida requested review from caridy and diervo September 26, 2018 22:44
@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: 633a000 | Target commit: 2965213

lwc-engine-benchmark

table-append-1k metric base(633a000) target(2965213) trend
benchmark-table/append/1k duration 165.00 (±4.35 ms) 158.05 (±3.85 ms) -6.9ms (4.2%) 👍
table-clear-1k metric base(633a000) target(2965213) trend
benchmark-table/clear/1k duration 12.95 (±0.65 ms) 12.40 (±0.60 ms) -0.5ms (4.2%) 👍
table-create-10k metric base(633a000) target(2965213) trend
benchmark-table/create/10k duration 944.20 (±9.50 ms) 940.20 (±8.60 ms) -4.0ms (0.4%) 👌
table-create-1k metric base(633a000) target(2965213) trend
benchmark-table/create/1k duration 113.85 (±2.45 ms) 111.20 (±2.20 ms) -2.6ms (2.3%) 👍
table-update-10th-1k metric base(633a000) target(2965213) trend
benchmark-table/update-10th/1k duration 98.30 (±2.05 ms) 86.00 (±1.95 ms) -12.3ms (12.5%) 👍
tablecmp-append-1k metric base(633a000) target(2965213) trend
benchmark-table-component/append/1k duration 244.00 (±7.80 ms) 251.00 (±7.90 ms) +7.0ms (2.9%) 👎
tablecmp-clear-1k metric base(633a000) target(2965213) trend
benchmark-table-component/clear/1k duration 20.10 (±1.90 ms) 20.60 (±1.65 ms) +0.5ms (2.5%) 👌
tablecmp-create-10k metric base(633a000) target(2965213) trend
benchmark-table-component/create/10k duration 1658.20 (±8.95 ms) 1656.75 (±12.65 ms) -1.4ms (0.1%) 👌
tablecmp-create-1k metric base(633a000) target(2965213) trend
benchmark-table-component/create/1k duration 185.70 (±7.00 ms) 186.05 (±4.25 ms) +0.4ms (0.2%) 👌
tablecmp-update-10th-1k metric base(633a000) target(2965213) trend
benchmark-table-component/update-10th/1k duration 84.85 (±6.35 ms) 81.95 (±6.20 ms) -2.9ms (3.4%) 👌
wc-append-1k metric base(633a000) target(2965213) trend
benchmark-table-wc/append/1k duration 278.70 (±16.05 ms) 271.45 (±18.50 ms) -7.3ms (2.6%) 👌
wc-clear-1k metric base(633a000) target(2965213) trend
benchmark-table-wc/clear/1k duration 29.20 (±1.90 ms) 29.95 (±1.80 ms) +0.8ms (2.6%) 👌
wc-create-10k metric base(633a000) target(2965213) trend
benchmark-table-wc/create/10k duration 2145.10 (±12.95 ms) 2145.75 (±12.80 ms) +0.7ms (0.0%) 👌
wc-create-1k metric base(633a000) target(2965213) trend
benchmark-table-wc/create/1k duration 225.10 (±4.90 ms) 226.70 (±5.15 ms) +1.6ms (0.7%) 👌
wc-update-10th-1k metric base(633a000) target(2965213) trend
benchmark-table-wc/update-10th/1k duration 85.05 (±5.60 ms) 86.00 (±6.90 ms) +1.0ms (1.1%) 👌

@ekashida
Copy link
Member Author

No tests because I'm unable to create a test that throws when retargeting detached targets via programmatic interaction, although I'm able to reproduce via manual interaction.

@ekashida
Copy link
Member Author

Related lightning-components change: https://github.com/salesforce/lightning-components/pull/204

@ekashida ekashida merged commit faf9cd4 into master Sep 27, 2018
@ekashida ekashida deleted the fix-event-target-exception branch September 27, 2018 05:11
ekashida added a commit that referenced this pull request Sep 27, 2018
ekashida added a commit that referenced this pull request Sep 27, 2018
ekashida added a commit that referenced this pull request Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants