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

Commit 9ddd8f5

Browse files
committed
Merge pull request #39 from jgibbons/master
resolve java.lang.NullPointerException
2 parents ef0ef7d + bd1adc9 commit 9ddd8f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/android/IonicKeyboard.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ public void run() {
7171

7272
if (v == null) {
7373
callbackContext.error("No current focus");
74+
} else {
75+
inputManager.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
76+
callbackContext.success(); // Thread-safe.
7477
}
75-
inputManager.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
76-
callbackContext.success(); // Thread-safe.
7778
}
7879
});
7980
return true;

0 commit comments

Comments
 (0)