Skip to content

Commit 011fc28

Browse files
sandrodw3brianchandotcom
authored andcommitted
LPD-72734 Use capture for event listener
1 parent bc9659b commit 011fc28

File tree

1 file changed

+7
-2
lines changed
  • modules/apps/layout/layout-content-page-editor-web/src/main/resources/META-INF/resources/page_editor/app/processors

1 file changed

+7
-2
lines changed

modules/apps/layout/layout-content-page-editor-web/src/main/resources/META-INF/resources/page_editor/app/processors/getAlloyEditorProcessor.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ export default function getAlloyEditorProcessor(
161161
removeListener: () =>
162162
document.removeEventListener(
163163
'click',
164-
onClickOutside
164+
onClickOutside,
165+
true
165166
),
166167
},
167168
nativeEditor.on('key', (event) => {
@@ -189,7 +190,11 @@ export default function getAlloyEditorProcessor(
189190
// Ignoring the blur event, because we don't want to destroy the editor
190191
// when opening a selector (image or link).
191192

192-
document.addEventListener('click', onClickOutside);
193+
document.addEventListener(
194+
'click',
195+
onClickOutside,
196+
true
197+
);
193198
}
194199
}),
195200

0 commit comments

Comments
 (0)