Skip to content

Commit

Permalink
perf: don't lock main thread when iframe styles changed
Browse files Browse the repository at this point in the history
This may occur in dev environments when styles are injected into the parent <head>, causing issues if this occurs during a drop. For example, using @mui/material in form inputs injects styles as soon as an item is dropped via emotion, causing the main thread to hang. Deferring this until after the main thread is completed via measured/auto-frame-component@0.1.3 addresses the issue.
  • Loading branch information
chrisvxd committed Apr 11, 2024
1 parent 25a7c4b commit e529e85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"typescript": "^4.5.2"
},
"dependencies": {
"@measured/auto-frame-component": "0.1.2",
"@measured/auto-frame-component": "0.1.3",
"@measured/dnd": "16.6.0-canary.eda7e8b",
"deep-diff": "^1.0.2",
"react-hotkeys-hook": "^4.4.1",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1445,10 +1445,10 @@
"@types/mdx" "^2.0.0"
"@types/react" ">=16"

"@measured/auto-frame-component@0.1.2":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@measured/auto-frame-component/-/auto-frame-component-0.1.2.tgz#843452f23640c85e0664f90d7138dde6b7f15254"
integrity sha512-EWSGEbZMbsN2msHK0QMEoHZo9SgmD61/RSGQ/Wxo4TZoz5Fkqz8/k9+u4mbL8EpyL3o3tqouWp1bkNAiAkxf5g==
"@measured/auto-frame-component@0.1.3":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@measured/auto-frame-component/-/auto-frame-component-0.1.3.tgz#1bf58ebce336f813b0d96a914cc6ce2acf271b25"
integrity sha512-oDGftzZ/VsMfgwDZvOcYNPCFgz6Lj2Uy2llfejt3HoZMJ9Nro7dzCcxc+EYMoIVzZGAGXA2gpfMLTCJFcLfa6g==
dependencies:
object-hash "^3.0.0"
react-frame-component "5.2.6"
Expand Down

0 comments on commit e529e85

Please sign in to comment.