Skip to content

Commit 4d120b6

Browse files
committed
fixes (dark reader breaks things)
1 parent b935b91 commit 4d120b6

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

haxe/ui/backend/ComponentImpl.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,9 @@ class ComponentImpl extends ComponentBase {
700700

701701
@:access(haxe.ui.core.Screen)
702702
private override function getComponentOffset():Point {
703-
return new Point(Screen.instance.pageRoot(element).offsetLeft, Screen.instance.pageRoot(element).offsetTop);
703+
return new Point(0, 0);
704+
// ill concieved?
705+
//return new Point(Screen.instance.pageRoot(element).offsetLeft, Screen.instance.pageRoot(element).offsetTop);
704706
}
705707

706708
@:access(haxe.ui.core.Screen)

haxe/ui/backend/html5/util/StyleSheetHelper.hx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@ class StyleSheetHelper {
1515

1616
var sheet:CSSStyleSheet = null;
1717
for (test in Browser.document.styleSheets) {
18+
if (test.ownerNode == null || test.disabled == true) {
19+
continue;
20+
}
1821
var css = cast(test, CSSStyleSheet);
1922
if (css.ownerNode.nodeName == "STYLE" && css.href == null) {
20-
sheet = css;
21-
break;
23+
try {
24+
var r = css.cssRules;
25+
sheet = css;
26+
break;
27+
} catch (e:Dynamic) {
28+
}
2229
}
2330
}
2431

0 commit comments

Comments
 (0)