Skip to content

Commit d6ffa48

Browse files
authored
fix(ui5-popup): prevent interaction with the content under the popup (#2119)
1 parent e282fc8 commit d6ffa48

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

packages/main/src/Popup.js

+7
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,13 @@ class Popup extends UI5Element {
204204
return staticAreaStyles;
205205
}
206206

207+
/**
208+
* Prevents the user from interacting with the content under the block layer
209+
*/
210+
_onBlockLayerKeyDown(event) {
211+
event.preventDefault();
212+
}
213+
207214
/**
208215
* Temporarily removes scrollbars from the body
209216
* @protected

packages/main/src/PopupBlockLayer.hbs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
<div class="ui5-block-layer" ?hidden={{_blockLayerHidden}} style="{{styles.blockLayer}}"></div>
1+
<div class="ui5-block-layer"
2+
?hidden={{_blockLayerHidden}}
3+
tabindex="1"
4+
style="{{styles.blockLayer}}"
5+
@keydown="{{_onBlockLayerKeyDown}}">
6+
</div>

0 commit comments

Comments
 (0)