Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/base/src/css/OpenUI5PopupStyles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[data-sap-ui-popup][popover] {
border: none;
overflow: visible;
margin: 0;
}
10 changes: 10 additions & 0 deletions packages/base/src/features/insertOpenUI5PopupStyles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { hasStyle, createStyle } from "../ManagedStyles.js";
import openUI5PopupStyles from "../generated/css/OpenUI5PopupStyles.css.js";

const insertOpenUI5PopupStyles = () => {
if (!hasStyle("data-ui5-popup-styles")) {
createStyle(openUI5PopupStyles, "data-ui5-popup-styles");
}
};

export default insertOpenUI5PopupStyles;
2 changes: 2 additions & 0 deletions packages/base/src/features/patchPopup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// OpenUI5's Control.js subset
import getSharedResource from "../getSharedResource.js";
import insertOpenUI5PopupStyles from "./insertOpenUI5PopupStyles.js";

type Control = {
getDomRef: () => HTMLElement | null,
Expand Down Expand Up @@ -137,6 +138,7 @@ const createGlobalStyles = () => {
};

const patchPopup = (Popup: OpenUI5Popup) => {
insertOpenUI5PopupStyles();
patchOpen(Popup); // Popup.prototype.open
patchClosed(Popup); // Popup.prototype._closed
createGlobalStyles(); // Ensures correct popover positioning by OpenUI5 (otherwise 0,0 is the center of the screen)
Expand Down
Loading