Skip to content
This repository was archived by the owner on Apr 2, 2018. It is now read-only.

Commit 7cf18ba

Browse files
author
Omar Mefire
committed
Windows support: Remove Windows Phone only limitation
1 parent 4290523 commit 7cf18ba

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Close the keyboard if it is open.
5151
Supported Platforms
5252
-------------------
5353

54-
- iOS, Android, Blackberry 10, Windows (_Windows Phone devices only_)
54+
- iOS, Android, Blackberry 10, Windows
5555

5656

5757
Keyboard.disableScroll
@@ -76,7 +76,7 @@ Force keyboard to be shown. This typically helps if autofocus on a text element
7676

7777
Supported Platforms
7878

79-
- Android, Blackberry 10, Windows (_Windows Phone devices only_)
79+
- Android, Blackberry 10, Windows
8080

8181
native.keyboardshow
8282
=================

src/windows/KeyboardProxy.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/*global Windows, WinJS, cordova, module, require*/
33

44
var inputPane = Windows.UI.ViewManagement.InputPane.getForCurrentView();
5-
var isPhone = cordova.platformId === 'windows' && WinJS.Utilities.isPhone;
65
var keyboardScrollDisabled = false;
76

87
inputPane.addEventListener('hiding', function() {
@@ -25,17 +24,13 @@ module.exports.disableScroll = function (win, fail, args) {
2524
};
2625

2726
module.exports.show = function () {
28-
// Due to https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.viewmanagement.inputpane.tryshow.aspx
29-
// this action available on Windows Phone devices only
30-
if (isPhone) {
27+
if (typeof inputPane.tryShow === 'function') {
3128
inputPane.tryShow();
3229
}
3330
};
3431

3532
module.exports.close = function () {
36-
// Due to https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.viewmanagement.inputpane.tryhide.aspx
37-
// this action available on Windows Phone devices only
38-
if (isPhone) {
33+
if (typeof inputPane.tryShow === 'function') {
3934
inputPane.tryHide();
4035
}
4136
};

0 commit comments

Comments
 (0)