diff --git a/native/cocos/ui/edit-box/EditBox-mac.mm b/native/cocos/ui/edit-box/EditBox-mac.mm index e6280e3e66..ce906acd23 100644 --- a/native/cocos/ui/edit-box/EditBox-mac.mm +++ b/native/cocos/ui/edit-box/EditBox-mac.mm @@ -170,9 +170,9 @@ void getTextInputCallback() { } void callJSFunc(const ccstd::string &type, const ccstd::string &text) { - getTextInputCallback(); - se::AutoHandleScope scope; + + getTextInputCallback(); se::ValueArray args; args.push_back(se::Value(type)); args.push_back(se::Value(text));