fix(ios): TextField keyboard handling with emoji, autofill, and shortcuts (#10154)

closes https://github.com/NativeScript/NativeScript/issues/10108
This commit is contained in:
Nathan Walker
2023-01-03 17:36:56 -08:00
committed by GitHub
parent d138ac000d
commit 00944bb1b5
9 changed files with 50 additions and 4 deletions

View File

@@ -10,6 +10,7 @@
<Button text="box-shadow" tap="{{ viewDemo }}" class="btn btn-primary btn-view-demo" />
<Button text="css-playground" tap="{{ viewDemo }}" class="btn btn-primary btn-view-demo" />
<Button text="datepicker" tap="{{ viewDemo }}" class="btn btn-primary btn-view-demo" />
<Button text="forms" tap="{{ viewDemo }}" class="btn btn-primary btn-view-demo" />
<Button text="image-async" tap="{{ viewDemo }}" class="btn btn-primary btn-view-demo" />
<Button text="image-handling" tap="{{ viewDemo }}" class="btn btn-primary btn-view-demo" />
<Button text="labels" tap="{{ viewDemo }}" class="btn btn-primary btn-view-demo" />

View File

@@ -0,0 +1,16 @@
import { Page, Observable, EventData } from '@nativescript/core';
let page: Page;
export function navigatingTo(args: EventData) {
page = <Page>args.object;
page.bindingContext = new SampleData();
}
export class SampleData extends Observable {
textInput = '';
textChange(args) {
console.log(args.object.text);
this.notifyPropertyChange('textInput', args.object.text);
}
}

View File

@@ -0,0 +1,15 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page">
<Page.actionBar>
<ActionBar title="Labels and TextView" class="action-bar">
</ActionBar>
</Page.actionBar>
<ScrollView>
<StackLayout padding="20">
<Label text="TextField:" fontWeight="bold" />
<TextField textChange="{{ textChange }}" marginTop="6" backgroundColor="#efefef" padding="8" fontSize="18" keyboardType="url" />
<Label text="{{ textInput }}" marginTop="6" />
</StackLayout>
</ScrollView>
</Page>