mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 19:53:53 -06:00
FIX: Composer height issue in Safari on iOS 15 (#14282)
This commit is contained in:
parent
11a07b37e1
commit
0dab1634b0
@ -98,7 +98,10 @@ function positioningWorkaround($fixedElement) {
|
|||||||
|
|
||||||
positioningWorkaround.blur = function (evt) {
|
positioningWorkaround.blur = function (evt) {
|
||||||
if (workaroundActive) {
|
if (workaroundActive) {
|
||||||
$("body").removeClass("ios-safari-composer-hacks");
|
document.body.classList.remove("ios-safari-composer-hacks");
|
||||||
|
if (caps.isIOS15Safari) {
|
||||||
|
document.body.classList.remove("ios-safari-15-hack");
|
||||||
|
}
|
||||||
window.scrollTo(0, originalScrollTop);
|
window.scrollTo(0, originalScrollTop);
|
||||||
|
|
||||||
if (evt && evt.target) {
|
if (evt && evt.target) {
|
||||||
@ -188,7 +191,10 @@ function positioningWorkaround($fixedElement) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$("body").addClass("ios-safari-composer-hacks");
|
document.body.classList.add("ios-safari-composer-hacks");
|
||||||
|
if (caps.isIOS15Safari) {
|
||||||
|
document.body.classList.add("ios-safari-15-hack");
|
||||||
|
}
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
|
|
||||||
if (!iOSWithVisualViewport()) {
|
if (!iOSWithVisualViewport()) {
|
||||||
|
@ -43,6 +43,11 @@ export default {
|
|||||||
(/iPhone|iPod/.test(navigator.userAgent) || caps.isIpadOS) &&
|
(/iPhone|iPod/.test(navigator.userAgent) || caps.isIpadOS) &&
|
||||||
!window.MSStream;
|
!window.MSStream;
|
||||||
|
|
||||||
|
caps.isIOS15Safari =
|
||||||
|
caps.isIOS &&
|
||||||
|
/Version\/15/.test(navigator.userAgent) &&
|
||||||
|
!/DiscourseHub/.test(navigator.userAgent);
|
||||||
|
|
||||||
caps.hasContactPicker =
|
caps.hasContactPicker =
|
||||||
"contacts" in navigator && "ContactsManager" in window;
|
"contacts" in navigator && "ContactsManager" in window;
|
||||||
|
|
||||||
|
@ -32,6 +32,13 @@
|
|||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// iOS 15 Safari has a floating address bar that displays above the composer submit bar
|
||||||
|
// we cannot detect its preseence, so we need to add extra padding
|
||||||
|
// Apple says it's a known issue, see https://bugs.webkit.org/show_bug.cgi?id=229876
|
||||||
|
.keyboard-visible body.ios-safari-15-hack &.open .reply-area {
|
||||||
|
padding-bottom: 45px;
|
||||||
|
}
|
||||||
|
|
||||||
.reply-to {
|
.reply-to {
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
.reply-details {
|
.reply-details {
|
||||||
|
Loading…
Reference in New Issue
Block a user