Skip to content

Commit cdc7787

Browse files
committed
Fix - do not use 'inset' in JavaScript
QWebEngine on windows has problems with it
1 parent de8c0ae commit cdc7787

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

modules/base/BasePainter.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ class BasePainter {
612612
enlarge = d3_select(doc.body)
613613
.append('div')
614614
.attr('id', 'jsroot_enlarge_div')
615-
.attr('style', 'position: fixed; margin: 0px; border: 0px; padding: 0px; inset: 1px; background: white; opacity: 0.95; z-index: 100; overflow: hidden;');
615+
.attr('style', 'position: fixed; margin: 0px; border: 0px; padding: 0px; left: 1px; top: 1px; bottom: 1px; right: 1px; background: white; opacity: 0.95; z-index: 100; overflow: hidden;');
616616

617617
const rect1 = getElementRect(main),
618618
rect2 = getElementRect(enlarge);

modules/gpad/RPadPainter.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ class RPadPainter extends RObjectPainter {
393393
.style('width', '100%')
394394
.style('height', '100%')
395395
.style('position', 'absolute')
396-
.style('inset', '0px');
396+
.style('left', 0).style('top', 0).style('bottom', 0).style('right', 0);
397397
}
398398

399399
svg.style('filter', settings.DarkMode ? 'invert(100%)' : null);

modules/gpad/TPadPainter.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ class TPadPainter extends ObjectPainter {
572572
if (this._fixed_size)
573573
svg.attr('width', rect.width).attr('height', rect.height);
574574
else
575-
svg.style('width', '100%').style('height', '100%').style('inset', '0px');
575+
svg.style('width', '100%').style('height', '100%').style('left', 0).style('top', 0).style('bottom', 0).style('right', 0);
576576

577577
svg.style('filter', settings.DarkMode || this.pad?.$dark ? 'invert(100%)' : null);
578578

modules/gui.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ async function buildGUI(gui_element, gui_kind = '') {
181181
else {
182182
d3_select('html').style('height', '100%');
183183
d3_select('body').style('min-height', '100%').style('margin', 0).style('overflow', 'hidden');
184-
myDiv.style('position', 'absolute').style('inset', '0px').style('padding', '1px');
184+
myDiv.style('position', 'absolute').style('left', 0).style('top', 0).style('bottom', 0).style('right', 0).style('padding', '1px');
185185
}
186186
}
187187

modules/gui/display.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ class TabsDisplay extends MDIDisplay {
660660

661661
if (top.empty()) {
662662
top = dom.append('div').attr('class', 'jsroot_tabs')
663-
.attr('style', 'display: flex; flex-direction: column; position: absolute; overflow: hidden; inset: 0px 0px 0px 0px');
663+
.attr('style', 'display: flex; flex-direction: column; position: absolute; overflow: hidden; left: 0px; top: 0px; bottom: 0px; right: 0px;');
664664
labels = top.append('div').attr('class', 'jsroot_tabs_labels')
665665
.attr('style', 'white-space: nowrap; position: relative; overflow-x: auto');
666666
main = top.append('div').attr('class', 'jsroot_tabs_main')
@@ -707,7 +707,7 @@ class TabsDisplay extends MDIDisplay {
707707
const draw_frame = main.append('div')
708708
.attr('frame_title', title)
709709
.attr('class', 'jsroot_tabs_draw')
710-
.attr('style', 'overflow: hidden; position: absolute; inset: 0px')
710+
.attr('style', 'overflow: hidden; position: absolute; left: 0px; top: 0px; bottom: 0px; right: 0px;')
711711
.property('frame_id', frame_id);
712712

713713
this.modifyTabsFrame(frame_id, 'activate');
@@ -1274,7 +1274,7 @@ class BrowserLayout {
12741274
input_style = settings.DarkMode ? `background-color: #222; color: ${text_color}` : '';
12751275

12761276
injectStyle(
1277-
'.jsroot_browser { pointer-events: none; position: absolute; inset: 0px; margin: 0px; border: 0px; overflow: hidden; }'+
1277+
'.jsroot_browser { pointer-events: none; position: absolute; left: 0px; top: 0px; bottom: 0px; right: 0px; margin: 0px; border: 0px; overflow: hidden; }'+
12781278
`.jsroot_draw_area { background-color: ${bkgr_color}; overflow: hidden; margin: 0px; border: 0px; }`+
12791279
`.jsroot_browser_area { color: ${text_color}; background-color: ${bkgr_color}; font-size: 12px; font-family: Verdana; pointer-events: all; box-sizing: initial; }`+
12801280
`.jsroot_browser_area input { ${input_style} }`+
@@ -1296,7 +1296,7 @@ class BrowserLayout {
12961296
main.append('div').attr('id', this.drawing_divid())
12971297
.classed('jsroot_draw_area', true)
12981298
.style('position', 'absolute')
1299-
.style('inset', '0px');
1299+
.style('left', 0).style('top', 0).style('bottom', 0).style('right', 0);
13001300

13011301
if (with_browser)
13021302
main.append('div').classed('jsroot_browser', true);

modules/gui/menu.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ class StandaloneMenu extends JSRootMenu {
13231323
block = d3_select('body').append('div')
13241324
.attr('id', `${dlg_id}_block`)
13251325
.attr('class', 'jsroot_dialog_block')
1326-
.attr('style', 'z-index: 100000; position: absolute; inset: 0px; opacity: 0.2; background-color: white'),
1326+
.attr('style', 'z-index: 100000; position: absolute; left: 0px; top: 0px; bottom: 0px; right: 0px; opacity: 0.2; background-color: white'),
13271327
element = d3_select('body')
13281328
.append('div')
13291329
.attr('id', dlg_id)

0 commit comments

Comments
 (0)