Skip to content

Commit f0e719d

Browse files
committed
Merge branch 'mysubcult-fix-widget-firefox-android-keyboard'
2 parents 224b7d9 + fe73106 commit f0e719d

8 files changed

Lines changed: 23 additions & 9 deletions

File tree

‎lhc_web/design/defaulttheme/js/widgetv2/index.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lhc_web/design/defaulttheme/js/widgetv2/index.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lhc_web/design/defaulttheme/tpl/lhnotifications/opsettings.tpl.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<p><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('notifications/notifications','For more information see')?> <a target="_blank" href="https://developers.google.com/web/fundamentals/push-notifications/display-a-notification">https://developers.google.com/web/fundamentals/push-notifications/display-a-notification</a></p>
1212

13-
<p><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('notifications/notifications','You can generate your private and public key here')?> - <a target="_blank" href="https://web-push-codelab.glitch.me">https://web-push-codelab.glitch.me</a></p>
13+
<p><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('notifications/notifications','You can generate your private and public key here')?> - <a target="_blank" href="https://pwastack.com/tools/vapid-key-generator">https://pwastack.com/tools/vapid-key-generator</a></p>
1414

1515
<p><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('notifications/notifications','Explains were taken from:')?> <a target="_blank" href="https://web-push-book.gauntface.com/demos/notification-examples/">https://web-push-book.gauntface.com/demos/notification-examples/</a></p>
1616

‎lhc_web/design/defaulttheme/tpl/lhnotifications/settings.tpl.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<p><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('notifications/notifications','For more information see')?> <a target="_blank" href="https://developers.google.com/web/fundamentals/push-notifications/display-a-notification">https://developers.google.com/web/fundamentals/push-notifications/display-a-notification</a></p>
1212

13-
<p><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('notifications/notifications','You can generate your private and public key here')?> - <a target="_blank" href="https://web-push-codelab.glitch.me">https://web-push-codelab.glitch.me</a></p>
13+
<p><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('notifications/notifications','You can generate your private and public key here')?> - <a target="_blank" href="https://pwastack.com/tools/vapid-key-generator">https://pwastack.com/tools/vapid-key-generator</a></p>
1414

1515
<p><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('notifications/notifications','Explains were taken from:')?> <a target="_blank" href="https://web-push-book.gauntface.com/demos/notification-examples/">https://web-push-book.gauntface.com/demos/notification-examples/</a></p>
1616

‎lhc_web/design/defaulttheme/widget/wrapper/dist/index.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lhc_web/design/defaulttheme/widget/wrapper/dist/index.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lhc_web/design/defaulttheme/widget/wrapper/src/index.js‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
lhc.loaded = false;
5656
lhc.connected = false;
5757
lhc.ready = false;
58-
lhc.version = 278;
58+
lhc.version = 279;
5959

6060
const isMobileItem = require('ismobilejs');
6161
var isMobile = isMobileItem.default(global.navigator.userAgent).phone;
@@ -858,7 +858,7 @@
858858
chatEvents.sendChildEvent('subcribedEvent', [data]);
859859
});
860860

861-
var timeoutWidget = null, originalStyleSheet = null, scrollPosition = { x: 0, y: 0 };
861+
var timeoutWidget = null, originalStyleSheet = null, originalViewport = null, scrollPosition = { x: 0, y: 0 };
862862

863863
// Track widget status changes
864864
attributesWidget.widgetStatus.subscribe((data) => {
@@ -895,7 +895,21 @@
895895
}
896896
originalStyleSheet = document.body.style.cssText;
897897
document.body.style.cssText = 'height: 100% !important; min-height: 100% !important; max-height: 100% !important; width: 100% !important; min-width: 100% !important; max-width: 100% !important; overflow: hidden !important; position: fixed !important;';
898+
899+
// Firefox for Android (132+) defaults to interactive-widget=resizes-visual, so the keyboard does not
900+
// resize the layout viewport and the bottom address bar covers the bottom of the full screen widget (message input).
901+
// While the widget is open resize the layout viewport instead. Pages that set interactive-widget themselves are left untouched.
902+
var viewportMeta = document.querySelectorAll('meta[name="viewport"]');
903+
viewportMeta = viewportMeta.length > 0 ? viewportMeta[viewportMeta.length - 1] : null;
904+
if (originalViewport === null && viewportMeta !== null && viewportMeta.content.indexOf('interactive-widget') === -1) {
905+
originalViewport = {'element': viewportMeta, 'content': viewportMeta.content};
906+
viewportMeta.content = viewportMeta.content + ', interactive-widget=resizes-content';
907+
}
898908
} else if (originalStyleSheet !== null) {
909+
if (originalViewport !== null) {
910+
originalViewport.element.content = originalViewport.content;
911+
originalViewport = null;
912+
}
899913
document.body.style.cssText = originalStyleSheet;
900914
originalStyleSheet = null;
901915
// Use scrollTo with instant behavior to avoid animation

‎lhc_web/modules/lhwidgetrestapi/settings.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@
578578
$ts = time();
579579

580580
// Wrapper version
581-
$outputResponse['wv'] = 278;
581+
$outputResponse['wv'] = 279;
582582

583583
// React APP versions
584584
$outputResponse['v'] = 427;

0 commit comments

Comments
 (0)