Skip to content

Commit 4bc5cfc

Browse files
committed
onToggleExpandedKeyboard is iOS only
1 parent cc9b9a3 commit 4bc5cfc

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

lib/components/Keyboard/KeyboardInput/CustomKeyboardView.ios.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ export default class CustomKeyboardView extends CustomKeyboardViewBase {
3535
});
3636
}
3737

38+
componentWillUnmount() {
39+
KeyboardRegistry.removeListeners('onToggleExpandedKeyboard');
40+
super.componentWillUnmount();
41+
}
42+
3843
async UNSAFE_componentWillReceiveProps(nextProps) {
3944
const {inputRef, component, initialProps} = nextProps;
4045

lib/components/Keyboard/KeyboardInput/CustomKeyboardViewBase.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export default class CustomKeyboardViewBase extends Component {
3232

3333
componentWillUnmount() {
3434
KeyboardRegistry.removeListeners('onRequestShowKeyboard');
35-
KeyboardRegistry.removeListeners('onToggleExpandedKeyboard');
3635

3736
if (this.keyboardEventListeners) {
3837
this.keyboardEventListeners.forEach(eventListener => eventListener.remove());

lib/components/Keyboard/KeyboardInput/KeyboardRegistry.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ export default class KeyboardRegistry {
6666
KeyboardRegistry.notifyListeners('onRequestShowKeyboard', {keyboardId: globalID});
6767
};
6868

69+
/**
70+
* iOS only
71+
*/
6972
static toggleExpandedKeyboard = (globalID) => {
7073
KeyboardRegistry.notifyListeners('onToggleExpandedKeyboard', {keyboardId: globalID});
7174
};

0 commit comments

Comments
 (0)