!538 【问题修复】修复stopInput等的napi实现问题 && 修改选择输入法弹窗类型为悬浮窗类型

Merge pull request !538 from Hollokin/master
This commit is contained in:
openharmony_ci 2023-01-06 07:48:07 +00:00 committed by Gitee
commit 6208a4d728
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 5 additions and 1 deletions

View File

@ -133,6 +133,7 @@ napi_value JsGetInputMethodController::HandleSoftKeyboard(
ctxt->SetErrorCode(errCode); ctxt->SetErrorCode(errCode);
} }
}; };
ctxt->SetAction(std::move(input), std::move(output));
AsyncCall asyncCall(env, info, std::dynamic_pointer_cast<AsyncCall::Context>(ctxt), 0); AsyncCall asyncCall(env, info, std::dynamic_pointer_cast<AsyncCall::Context>(ctxt), 0);
return asyncCall.Call(env, exec); return asyncCall.Call(env, exec);
} }

View File

@ -37,7 +37,7 @@ export default class ServiceExtAbility extends ServiceExtensionAbility {
height: 300, height: 300,
} }
this.getInputMethods().then(() => { this.getInputMethods().then(() => {
this.createWindow("inputmethod Dialog:" + startId, window.WindowType.TYPE_DIALOG, dialogRect) this.createWindow("inputmethod Dialog:" + startId, window.WindowType.TYPE_FLOAT, dialogRect)
}) })
}).catch((err) => { }).catch((err) => {
console.log(TAG + "getDefaultDisplay err: " + JSON.stringify(err)); console.log(TAG + "getDefaultDisplay err: " + JSON.stringify(err));

View File

@ -27,6 +27,9 @@
"requestPermissions": [ "requestPermissions": [
{ {
"name": "ohos.permission.CONNECT_IME_ABILITY" "name": "ohos.permission.CONNECT_IME_ABILITY"
},
{
"name": "ohos.permission.SYSTEM_FLOAT_WINDOW"
} }
] ]
} }