mirror of
https://hk.gh-proxy.com/https://github.com/NodeBB/nodebb-plugin-emoji.git
synced 2025-10-04 01:20:58 +08:00
dont focus search on mobile
This commit is contained in:
parent
5fe47cb605
commit
ec535fb8cb
2 changed files with 5 additions and 1 deletions
|
@ -21,7 +21,10 @@ export const dialogActions = {
|
|||
$html.addClass('emoji-insert');
|
||||
dialog.addClass('open');
|
||||
dialog.appendTo(document.fullscreenElement || 'body');
|
||||
dialog.find('.emoji-dialog-search').focus();
|
||||
if (!utils.isTouchDevice()) {
|
||||
dialog.find('.emoji-dialog-search').focus();
|
||||
}
|
||||
|
||||
// need this setTimeout or onDocumentClick gets triggered too early
|
||||
// and causes https://github.com/NodeBB/NodeBB/issues/10589
|
||||
setTimeout(() => {
|
||||
|
|
1
public/lib/types.d.ts
vendored
1
public/lib/types.d.ts
vendored
|
@ -17,6 +17,7 @@ declare const ajaxify: {
|
|||
};
|
||||
declare const utils: {
|
||||
generateUUID(): string;
|
||||
isTouchDevice(): boolean;
|
||||
};
|
||||
|
||||
interface String {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue