You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this example, we are registering a handler to be called when the hardware back button is pressed. We have set the priority to be 10, and we have not indicated to the framework that we want the next handler to be called. As a result, any handlers with a priority less than 10 will not be called. A handler that has a priority greater than 10 will be called first.
84
94
@@ -88,8 +98,16 @@ In the event that there are handlers with the same priority value, the handler t
88
98
89
99
Each hardware back button callback has a `processNextHandler` parameter. Calling this function allows you to continue calling hardware back button handlers.
This example shows how to indicate to Ionic Framework that you want the next handler to be fired. All callbacks are provided with a `processNextHandler` function as a parameter. Calling this will cause the next handler, if any exists, to be fired.
171
189
@@ -198,8 +216,16 @@ In the example above, both handlers A and B have a priority of 10. Since handler
198
216
199
217
In some scenarios, it may be desirable to quit the app when pressing the hardware back button. This can be achieved through the use of the `ionBackButton` event combined with methods that Capacitor/Cordova provide.
This example shows the application exiting when the user presses the hardware back button and there is nothing left in the navigation stack. It is also possible to display a confirmation dialog before quitting the app.
Copy file name to clipboardExpand all lines: docs/developing/keyboard.md
+56-30Lines changed: 56 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
---
2
2
---
3
+
import Tabs from '@theme/Tabs';
4
+
import TabItem from '@theme/TabItem';
3
5
4
6
# Keyboard
5
7
@@ -16,8 +18,16 @@ Inputs that _require_ a certain data type should use the `type` attribute instea
16
18
For a list of accepted values, see the <ahref="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode"target="_blank"rel="noreferrer">inputmode Documentation</a>.
17
19
18
20
### Usage
19
-
<docs-tabs>
20
-
<docs-tabtab="Javascript">
21
+
<Tabs
22
+
defaultValue="javascript"
23
+
values={[
24
+
{ value: 'javascript', label: 'JavaScript' },
25
+
{ value: 'angular', label: 'Angular' },
26
+
{ value: 'react', label: 'React' },
27
+
{ value: 'vue', label: 'Vue' },
28
+
]
29
+
}>
30
+
<TabItemvalue="javascript">
21
31
22
32
```html
23
33
<ion-item>
@@ -30,8 +40,8 @@ For a list of accepted values, see the <a href="https://developer.mozilla.org/en
30
40
<ion-textareainputmode="numeric"></ion-textarea>
31
41
</ion-item>
32
42
```
33
-
</docs-tab>
34
-
<docs-tabtab="Angular">
43
+
</TabItem>
44
+
<TabItemvalue="angular">
35
45
36
46
```html
37
47
<ion-item>
@@ -44,8 +54,8 @@ For a list of accepted values, see the <a href="https://developer.mozilla.org/en
44
54
<ion-textareainputmode="numeric"></ion-textarea>
45
55
</ion-item>
46
56
```
47
-
</docs-tab>
48
-
<docs-tabtab="React">
57
+
</TabItem>
58
+
<TabItemvalue="react">
49
59
50
60
```html
51
61
<IonItem>
@@ -58,8 +68,8 @@ For a list of accepted values, see the <a href="https://developer.mozilla.org/en
58
68
<IonTextareainputmode="numeric"></IonTextarea>
59
69
</IonItem>
60
70
```
61
-
</docs-tab>
62
-
<docs-tabtab="Vue">
71
+
</TabItem>
72
+
<TabItemvalue="vue">
63
73
64
74
```html
65
75
<ion-item>
@@ -72,8 +82,8 @@ For a list of accepted values, see the <a href="https://developer.mozilla.org/en
@@ -88,44 +98,52 @@ Since `enterkeyhint` is a global attribute, it can be used on Ionic components s
88
98
For a list of accepted values, see the <ahref="https://html.spec.whatwg.org/dev/interaction.html#input-modalities:-the-enterkeyhint-attribute"target="_blank"rel="noreferrer">enterkeyhint Standard</a>.
@@ -154,8 +172,16 @@ When running an app in Capacitor or Cordova, it is possible to hide the accessor
154
172
Detecting the presence of an on-screen keyboard is useful for adjusting the positioning of an input that would otherwise be hidden by the keyboard. For Capacitor and Cordova apps, developers typically rely on native keyboard plugins to listen for the keyboard lifecycle events. For apps running in a mobile browser or as a PWA, developers can use the <ahref="https://developer.mozilla.org/en-US/docs/Web/API/Visual_Viewport_API"rel="noreferrer"target="_blank">Visual Viewport API</a> where supported. Ionic Framework wraps both of these approaches and emits `ionKeyboardDidShow` and `ionKeyboardDidHide` events on the `window`. The event payload for `ionKeyboardDidShow` contains an approximation of the keyboard height in pixels.
0 commit comments