Skip to content

Commit

Permalink
fix(ui5-popup): prevent interaction with the content under the popup (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fifoosid committed Aug 19, 2020
1 parent e282fc8 commit d6ffa48
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions packages/main/src/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,13 @@ class Popup extends UI5Element {
return staticAreaStyles;
}

/**
* Prevents the user from interacting with the content under the block layer
*/
_onBlockLayerKeyDown(event) {
event.preventDefault();
}

/**
* Temporarily removes scrollbars from the body
* @protected
Expand Down
7 changes: 6 additions & 1 deletion packages/main/src/PopupBlockLayer.hbs
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
<div class="ui5-block-layer" ?hidden={{_blockLayerHidden}} style="{{styles.blockLayer}}"></div>
<div class="ui5-block-layer"
?hidden={{_blockLayerHidden}}
tabindex="1"
style="{{styles.blockLayer}}"
@keydown="{{_onBlockLayerKeyDown}}">
</div>

0 comments on commit d6ffa48

Please sign in to comment.