Skip to content

Commit

Permalink
Change the attribute name of IME
Browse files Browse the repository at this point in the history
  • Loading branch information
darangkim committed Dec 4, 2015
1 parent fb2196a commit 96d8544
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cordova-js-src/plugin/ime-via-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
var focusFlag = true;
var elInput = null;
document.body.addEventListener('focus', function (e) {
if(document.activeElement && document.activeElement.tagName.toUpperCase() === 'INPUT' && (document.activeElement.type === 'text' || document.activeElement.type === 'password')) {
if(document.activeElement && document.activeElement.tagName.toUpperCase() === 'INPUT' &&
(document.activeElement.type === 'text' || document.activeElement.type === 'password')) {
if(focusFlag) {
elInput = document.activeElement;
onFocus();
Expand Down Expand Up @@ -59,7 +60,7 @@ function onFocus() {
imeInstance.setBlockSpace(true);
imeInstance.onKeyPressFunc = onKeyCallback;

elInput.setAttribute('data-toast-ime-shown', 'true');
elInput.setAttribute('data-ime-show', 'true');

imeInstance.onShow();
}
Expand Down Expand Up @@ -91,7 +92,7 @@ function onBlur() {
if(imeInstance) {
imeInstance.onClose();

elInput.setAttribute('data-toast-ime-shown', 'false');
elInput.setAttribute('data-ime-show', 'false');
elInput.blur();

imeInstance = null;
Expand Down

0 comments on commit 96d8544

Please sign in to comment.