Skip to content

Commit 11045e1

Browse files
authored
Merge pull request #5113 from OSC/ff-shell-fix-40
backport shell FF fix to 4.0
2 parents 23cb167 + 31c8481 commit 11045e1

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

apps/shell/public/javascripts/hterm_all_1.91.mod.js renamed to apps/shell/public/javascripts/hterm_all_1.91.mod_1.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12401,9 +12401,18 @@ hterm.ScrollPort.prototype.decorate = function(div, callback) {
1240112401
}
1240212402
};
1240312403

12404+
const agent = window.navigator.userAgent;
12405+
const versionMatch = agent.match(/rv:(\d+\.\d+)/);
12406+
let ffVersion = null;
12407+
12408+
if(versionMatch !== null && versionMatch.length == 2) {
12409+
ffVersion = versionMatch[1];
12410+
}
12411+
1240412412
// Insert Iframe content asynchronously in FF. Otherwise when the frame's
1240512413
// load event fires in FF it clears out the content of the iframe.
12406-
if ('mozInnerScreenX' in window) { // detect a FF only property
12414+
// Though this only applies to gecko/FF < version '148.0'.
12415+
if ('mozInnerScreenX' in window && ffVersion != null && ffVersion < "148.0" ) { // detect a FF only property
1240712416
this.iframe_.addEventListener('load', () => onLoad());
1240812417
} else {
1240912418
onLoad();

apps/shell/views/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<link rel="stylesheet" href="{{baseURI}}/stylesheets/style.css">
1212

1313
<script src="{{baseURI}}/javascripts/lodash-4.17.21/lodash.min.js"></script>
14-
<script src="{{baseURI}}/javascripts/hterm_all_1.91.mod.js"></script>
14+
<script src="{{baseURI}}/javascripts/hterm_all_1.91.mod_1.js"></script>
1515
<script src="{{baseURI}}/javascripts/ood_shell.2.js"></script>
1616
</head>
1717

0 commit comments

Comments
 (0)