Skip to content

Commit dceece2

Browse files
ci_lynxjianliang00
authored andcommitted
[BugFix] Use iOS xelement text inputs in Clay
- Removed iOS Clay bootstrap and builtin registrations for input and textarea tag families. - Let iOS xelement text input tags override Clay C++ view entries during native tag sync. - Verified with git diff --check. - Prevent Clay gesture from cancelling native textarea touches - summary: Guard native-owned iOS Clay platform view touch sequences from parent gesture recognition unless native event blocking is requested explicitly. This keeps textarea focus handling available inside a Clay scroll-view while preserving explicit blocking behavior. SkipChecks: macro AutoLand: release/4.0, release/3.9, release/3.8, release_3.8_weekly_20260522, release_3.8_weekly_20260605
1 parent 7abcb04 commit dceece2

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

clay/ui/component/builtin_views.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
// LICENSE file in the root directory of this source tree.
44
#include "clay/ui/component/builtin_views.h"
55

6+
#include "build/build_config.h"
67
#include "clay/ui/component/component.h"
78

89
#ifndef ENABLE_CLAY_LITE
10+
#ifndef OS_IOS
911
#include "clay/ui/component/editable/input_ng_view.h"
1012
#include "clay/ui/component/editable/input_view.h"
1113
#include "clay/ui/component/editable/textarea_ng_view.h"
1214
#include "clay/ui/component/editable/textarea_view.h"
1315
#include "clay/ui/shadow/editable_shadow_node.h"
16+
#endif // OS_IOS
1417
#endif // ENABLE_CLAY_LITE
1518

1619
#ifndef LYNX_ENABLE_CLAY_NATIVE_LIST
@@ -63,12 +66,14 @@ REGISTER_CLAY_ELEMENT("list", ListContainerWrapper, void);
6366
REGISTER_CLAY_ELEMENT("list-container", ListContainerWrapper, void);
6467

6568
#ifndef ENABLE_CLAY_LITE
69+
#ifndef OS_IOS
6670
REGISTER_CLAY_ELEMENT("x-input-ng", InputNGView, EditableShadowNode);
6771
REGISTER_CLAY_ELEMENT("x-textarea-ng", TextAreaNGView, EditableShadowNode);
6872
REGISTER_CLAY_ELEMENT("x-textarea", TextAreaView, EditableShadowNode);
6973
REGISTER_CLAY_ELEMENT("textarea", TextAreaView, EditableShadowNode);
7074
REGISTER_CLAY_ELEMENT("input", InputView, EditableShadowNode);
7175
REGISTER_CLAY_ELEMENT("x-input", InputView, EditableShadowNode);
76+
#endif // OS_IOS
7277
#endif // ENABLE_CLAY_LITE
7378

7479
#if (defined(OS_MAC) || defined(OS_WIN))

clay/ui/component/view_context.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ namespace clay {
6363

6464
static bool ForceUseXElement(const std::string& tag) {
6565
#ifdef OS_IOS
66-
return tag == "x-input"; // use xinput of xelement in iOS platform to avoid
67-
// some issues.
66+
// Let iOS xelement text input registrations override Clay C++ entries.
67+
return tag == "input" || tag == "x-input" || tag == "x-input-ng" ||
68+
tag == "textarea" || tag == "x-textarea" || tag == "x-textarea-ng";
6869
#else
6970
return false;
7071
#endif

0 commit comments

Comments
 (0)