diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle
index bb4a3e3..0947d25 100644
--- a/android/app/capacitor.build.gradle
+++ b/android/app/capacitor.build.gradle
@@ -10,6 +10,7 @@ android {
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-app')
+ implementation project(':capacitor-keyboard')
implementation project(':capacitor-push-notifications')
implementation project(':capacitor-status-bar')
implementation project(':capgo-capacitor-social-login')
diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle
index d787d98..99f4deb 100644
--- a/android/capacitor.settings.gradle
+++ b/android/capacitor.settings.gradle
@@ -5,6 +5,9 @@ project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/
include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
+include ':capacitor-keyboard'
+project(':capacitor-keyboard').projectDir = new File('../node_modules/@capacitor/keyboard/android')
+
include ':capacitor-push-notifications'
project(':capacitor-push-notifications').projectDir = new File('../node_modules/@capacitor/push-notifications/android')
diff --git a/package.json b/package.json
index 90c78a6..131eb76 100644
--- a/package.json
+++ b/package.json
@@ -29,6 +29,7 @@
"dependencies": {
"@capacitor/app": "7.1.0",
"@capacitor/core": "7.4.4",
+ "@capacitor/keyboard": "7.0.3",
"@capacitor/push-notifications": "7.0.3",
"@capacitor/status-bar": "7.0.3",
"@capgo/capacitor-social-login": "7.14.9",
diff --git a/web/components/page-base.tsx b/web/components/page-base.tsx
index 226d336..4138a4e 100644
--- a/web/components/page-base.tsx
+++ b/web/components/page-base.tsx
@@ -66,7 +66,7 @@ export function PageBase(props: {
diff --git a/web/pages/_app.tsx b/web/pages/_app.tsx
index a48d78c..5cd26e4 100644
--- a/web/pages/_app.tsx
+++ b/web/pages/_app.tsx
@@ -17,6 +17,7 @@ import {Capacitor} from '@capacitor/core'
import {StatusBar} from '@capacitor/status-bar'
import {App} from '@capacitor/app'
import {useRouter} from "next/navigation";
+import {Keyboard} from "@capacitor/keyboard";
if (Capacitor.isNativePlatform()) {
// Only runs on iOS/Android native
@@ -70,6 +71,19 @@ function MyApp({Component, pageProps}: AppProps) {
useHasLoaded()
const router = useRouter()
+ useEffect(() => {
+ if (!Capacitor.isNativePlatform()) return
+ const onShow = () => document.body.classList.add('keyboard-open');
+ const onHide = () => document.body.classList.remove('keyboard-open');
+
+ Keyboard.addListener('keyboardWillShow', onShow);
+ Keyboard.addListener('keyboardWillHide', onHide);
+
+ return () => {
+ Keyboard.removeAllListeners();
+ };
+ }, []);
+
useEffect(() => {
initTracking()
diff --git a/web/pages/messages/[channelId].tsx b/web/pages/messages/[channelId].tsx
index e880d37..f96cef4 100644
--- a/web/pages/messages/[channelId].tsx
+++ b/web/pages/messages/[channelId].tsx
@@ -294,7 +294,7 @@ export const PrivateChat = (props: {
)}
-
+
li::marker {
color: #374151; /* pick a visible color */
}
-.safe-top {
- /*padding-top: calc(20px);*/
- padding-top: env(safe-area-inset-top);
- box-sizing: border-box; /* ensure padding doesn’t break layout */
-}
-
-.safe-bottom {
- /*bottom: calc(48px);*/
- bottom: env(safe-area-inset-bottom);
-}
-
diff --git a/yarn.lock b/yarn.lock
index 2879eb0..5d15be8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1192,6 +1192,11 @@
dependencies:
tslib "^2.1.0"
+"@capacitor/keyboard@7.0.3":
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/@capacitor/keyboard/-/keyboard-7.0.3.tgz#8e05a70a386479f0cd2778fbec1adda5f6e18cee"
+ integrity sha512-BIBKjmky5rOYNhvYhNeDi0MMvjwYZ6YF9JoCYcGKvKY+XLJKtezsEL78XfOlgWZBkbfR8uq3tzktY6PqgoYLKA==
+
"@capacitor/push-notifications@7.0.3":
version "7.0.3"
resolved "https://registry.yarnpkg.com/@capacitor/push-notifications/-/push-notifications-7.0.3.tgz#b053f5c8db8cc8ceddda8dd9a1c744a72113e202"