Skip to content

Commit e0744d6

Browse files
authoredJul 16, 2021
fix(ui5-responsive-popover): fixed position of downward pointing arrow (#3508)
ResponsivePopover resets the custom property `_ui5_popup_content_padding` as it is used by other components. The calculation for the position of the arrow depended on the padding, and the calculation will be wrong when the padding is set to "0". Solved by changing the positioning of the arrow by using `top`. Fixes #3500
1 parent 76dcdbf commit e0744d6

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
 

‎packages/main/src/themes/Popover.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
:host([actual-placement-type="Top"]) .ui5-popover-arrow {
5656
left: calc(50% - 0.5625rem);
5757
height: 0.5625rem;
58-
bottom: calc(-1 * (var(--_ui5_popup_content_padding) + 2px));
58+
top: 100%;
5959
}
6060

6161
:host([actual-placement-type="Top"]) .ui5-popover-arrow:after {

‎packages/main/test/pages/ResponsivePopover.html

+9
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ <h2> Inputs based component that opens popover/dialog within dialog</h2>
9999
Content
100100
</ui5-responsive-popover>
101101

102+
<ui5-button id="btnRpTopWithArrow">RP on Top with downward pointing arrow</ui5-button>
103+
<ui5-responsive-popover placement-type="Top" id="rpTopWithArrow">
104+
<div>text</div>
105+
</ui5-responsive-popover>
106+
102107
<script>
103108
btnOpen.addEventListener("click", function(event) {
104109
respPopover.openBy(btnOpen);
@@ -127,6 +132,10 @@ <h2> Inputs based component that opens popover/dialog within dialog</h2>
127132
btnSimpleRP.addEventListener("click", function(event) {
128133
simpleRP.openBy(btnSimpleRP);
129134
});
135+
136+
btnRpTopWithArrow.addEventListener("click", function(event) {
137+
rpTopWithArrow.openBy(btnRpTopWithArrow);
138+
});
130139
</script>
131140
</body>
132141
</html>

0 commit comments

Comments
 (0)
Please sign in to comment.