File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
apps/client/src/code/pages/page/regions Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -69,13 +69,21 @@ export interface IPageRegion {
6969}
7070
7171export function getIslandRoot ( region : PageRegion ) : PageRegion {
72- if (
73- region . type === 'page' ||
74- ( ! region . react . container . spatial && region . react . container . overflow )
75- ) {
72+ if ( region . type === 'page' ) {
7673 return region ;
7774 } else {
78- return region . react . region . react . islandRoot ;
75+ const parentRegion =
76+ region ?. type === 'note' ? region . react . region : undefined ;
77+
78+ if (
79+ parentRegion ?. type === 'note' &&
80+ ! parentRegion . react . container . spatial &&
81+ parentRegion . react . container . overflow
82+ ) {
83+ return parentRegion ;
84+ } else {
85+ return region . react . region . react . islandRoot ;
86+ }
7987 }
8088}
8189
You can’t perform that action at this time.
0 commit comments