File tree Expand file tree Collapse file tree
packages/builder-web-core/widgets-native/html-iframe Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,4 +139,26 @@ export class HtmlIframe extends Container implements IIframeProps {
139139 attributes : attrs ,
140140 } ;
141141 }
142+
143+ get finalStyle ( ) {
144+ const superstyl = super . finalStyle ;
145+
146+ // width override. ------------------------------------------------------------------------------------------
147+ // iframe element's width needs to be specified if the position is absolute and the left & right is specified.
148+ let width = superstyl . width ;
149+ if (
150+ width === undefined &&
151+ superstyl . position === "absolute" &&
152+ superstyl . left !== undefined &&
153+ superstyl . right !== undefined
154+ ) {
155+ width = "calc(100% - " + superstyl . left + " - " + superstyl . right + ")" ;
156+ }
157+ // ----------------------------------------------------------------------------------------------------------
158+
159+ return {
160+ ...superstyl ,
161+ width,
162+ } ;
163+ }
142164}
You can’t perform that action at this time.
0 commit comments