Skip to content

Commit 56152d7

Browse files
committed
fix iOS
1 parent d3bcec8 commit 56152d7

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

js/jquery.terminal-src.js

+11-4
Original file line numberDiff line numberDiff line change
@@ -10630,11 +10630,11 @@
1063010630
'--terminal-height': self.height(),
1063110631
'--terminal-x': offset.left - self_offset.left,
1063210632
'--terminal-y': offset.top - self_offset.top,
10633-
'--terminal-scroll': self.prop('scrollTop')
10633+
'--terminal-scroll': scroller.prop('scrollTop')
1063410634
});
1063510635
if (enabled) {
10636-
// Firefox won't reflow the cursor automatically, so
10637-
// hide it briefly then reshow it
10636+
// Firefox won't reflow the cursor automatically,
10637+
// so we hide it briefly then reshow it
1063810638
cmd_cursor.hide();
1063910639
self.oneTime(1, 'flush', function() {
1064010640
cmd_cursor.show();
@@ -12020,6 +12020,13 @@
1202012020
if (!move) {
1202112021
if (!enabled) {
1202212022
clip.focus();
12023+
window.visualViewport.addEventListener('resize', function(event) {
12024+
self.scroll_to_bottom();
12025+
var scroll_pos = scroller.prop('scrollTop');
12026+
css(self[0], {
12027+
'--terminal-scroll': scroll_pos
12028+
});
12029+
}, { once: true });
1202312030
self.focus();
1202412031
} else {
1202512032
clip.blur();
@@ -12536,7 +12543,7 @@
1253612543
ret = settings.touchscroll(event, delta, self);
1253712544
}
1253812545
css(self[0], {
12539-
'--terminal-scroll': self.prop('scrollTop')
12546+
'--terminal-scroll': scroller.prop('scrollTop')
1254012547
});
1254112548
if (ret === true) {
1254212549
return;

0 commit comments

Comments
 (0)