diff --git a/frameworks/js/napi/inputmethodability/js_text_input_client_engine.cpp b/frameworks/js/napi/inputmethodability/js_text_input_client_engine.cpp index 6e1fb4cf9e98a7eb67c76250e03c9e08952981a8..e6bc4d2e8c5736a303eb39a6a73b4eb1e76ee596 100644 --- a/frameworks/js/napi/inputmethodability/js_text_input_client_engine.cpp +++ b/frameworks/js/napi/inputmethodability/js_text_input_client_engine.cpp @@ -568,7 +568,7 @@ napi_value JsTextInputClientEngine::GetEditorAttributeSync(napi_env env, napi_ca } IMSA_HILOGD("getEditorAttribute, patternCode: %{public}d", inputPattern); - const InputAttribute attribute = { .inputPattern = enterKeyType, .enterKeyType = inputPattern }; + const InputAttribute attribute = { .inputPattern = inputPattern, .enterKeyType = enterKeyType }; return JsUtils::GetValue(env, attribute); }