Skip to content

Commit

Permalink
Merge pull request #639 from GetStream/ios-safari-keyboard
Browse files Browse the repository at this point in the history
fix: close virtual keyboard is message menu is opened on iOS Safari
  • Loading branch information
szuperaz authored Sep 11, 2024
2 parents d8dee95 + a13ffa5 commit 8d7905d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"@ctrl/ngx-emoji-mart": "^8.2.0",
"@floating-ui/dom": "^1.6.3",
"@ngx-translate/core": "^14.0.0",
"@stream-io/stream-chat-css": "4.17.4",
"@stream-io/stream-chat-css": "4.17.5",
"@stream-io/transliterate": "^1.5.2",
"angular-mentions": "1.4.0",
"dayjs": "^1.11.10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,14 @@ export class MessageComponent
return;
} else {
this.shouldPreventMessageMenuClose = !options.fromTouch;
// Fix for iOS Safari: iOS Safari won't close the input if we open message menu
// The virtual keyboard can hide parts of the message menu, so we close the input here
if (
document.activeElement &&
typeof (document.activeElement as HTMLInputElement).blur !==
'undefined'
)
(document.activeElement as HTMLInputElement).blur();
this.messageMenuTrigger?.show();
}
if (this.isViewInited) {
Expand Down

0 comments on commit 8d7905d

Please sign in to comment.