mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(ios): TextField keyboard handling with emoji, autofill, and shortcuts (#10154)
closes https://github.com/NativeScript/NativeScript/issues/10108
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import * as types from './types';
|
||||
import { dispatchToMainThread, dispatchToUIThread, isMainThread } from './mainthread-helper';
|
||||
import { sanitizeModuleName } from '../ui/builder/module-name-sanitizer';
|
||||
import emojiRegex from 'emoji-regex';
|
||||
|
||||
import { GC } from './index';
|
||||
|
||||
@@ -203,3 +204,9 @@ export function queueGC(delay = 900, useThrottle?: boolean) {
|
||||
debouncedGC.get(delay)();
|
||||
}
|
||||
}
|
||||
|
||||
export function isEmoji(value: string): boolean {
|
||||
// TODO: In a future runtime update, we can switch to using Unicode Property Escapes:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escapes
|
||||
return emojiRegex().test(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user