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:
@@ -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" />
|
||||
|
||||
16
apps/toolbox/src/pages/forms.ts
Normal file
16
apps/toolbox/src/pages/forms.ts
Normal 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);
|
||||
}
|
||||
}
|
||||
15
apps/toolbox/src/pages/forms.xml
Normal file
15
apps/toolbox/src/pages/forms.xml
Normal 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>
|
||||
Reference in New Issue
Block a user