File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -618,7 +618,10 @@ require({
618618
619619 // Apply user HTML to bucket.
620620 const htmlElement = bucketDoc . createElement ( "div" ) ;
621- htmlElement . innerHTML = htmlEditor . getValue ( ) ;
621+ // Stylesheet imports are weirdly broken in Firefox 140. This is a hacky workaround
622+ // https://github.com/CesiumGS/cesium/issues/12700
623+ const htmlCode = htmlEditor . getValue ( ) . replace ( / @ i m p o r t / , "@import " ) ;
624+ htmlElement . innerHTML = htmlCode ;
622625 bucketDoc . body . appendChild ( htmlElement ) ;
623626
624627 const onScriptTagError = function ( ) {
@@ -1176,7 +1179,9 @@ require({
11761179 baseHref = `${ baseHref . substring ( 0 , pos ) } /gallery/` ;
11771180
11781181 const code = jsEditor . getValue ( ) ;
1179- const html = htmlEditor . getValue ( ) ;
1182+ // Stylesheet imports are weirdly broken in Firefox 140. This is a hacky workaround
1183+ // https://github.com/CesiumGS/cesium/issues/12700
1184+ const html = htmlEditor . getValue ( ) . replace ( / @ i m p o r t / , "@import " ) ;
11801185 const data = makeCompressedBase64String ( [ code , html , baseHref ] ) ;
11811186
11821187 let url = getBaseUrl ( ) ;
You can’t perform that action at this time.
0 commit comments