Skip to content

fix: fix searchbox carousel navigation behaviour#21141

Draft
c5346163 wants to merge 13 commits intodevelopfrom
CXCDS-17219
Draft

fix: fix searchbox carousel navigation behaviour#21141
c5346163 wants to merge 13 commits intodevelopfrom
CXCDS-17219

Conversation

@c5346163
Copy link
Contributor

@c5346163 c5346163 commented Feb 10, 2026

Fix Safari searchbox carousel clicks closing results panel by preventing mousedown blur and moving next-slide logic into a reusable handler.

@c5346163 c5346163 requested a review from a team as a code owner February 10, 2026 11:42
@github-actions github-actions bot marked this pull request as draft February 10, 2026 11:42
@c5346163 c5346163 marked this pull request as ready for review February 10, 2026 11:43
@github-actions github-actions bot marked this pull request as draft February 10, 2026 11:43
@c5346163 c5346163 marked this pull request as ready for review February 10, 2026 11:44
@github-actions
Copy link
Contributor

Merge Checks Failed

Please push a commit to re-trigger the build.
To push an empty commit you can use `git commit --allow-empty -m "Trigger Build"`

@cypress
Copy link

cypress bot commented Feb 10, 2026

spartacus    Run #51898

Run Properties:  status check passed Passed #51898  •  git commit 6398fc9384 ℹ️: Merge f34e30e7202b05da95098d72f79b9302154cc9ff into e8e85b0dc9df49128d97da0599e7...
Project spartacus
Branch Review CXCDS-17219
Run status status check passed Passed #51898
Run duration 03m 38s
Commit git commit 6398fc9384 ℹ️: Merge f34e30e7202b05da95098d72f79b9302154cc9ff into e8e85b0dc9df49128d97da0599e7...
Committer Konrad Dzikowski
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 5
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 101
View all changes introduced in this branch ↗︎

@c5346163 c5346163 requested a review from rmch91 February 10, 2026 12:12
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions bot marked this pull request as draft February 10, 2026 12:58
@c5346163 c5346163 marked this pull request as ready for review February 10, 2026 14:19
@github-actions github-actions bot marked this pull request as draft February 10, 2026 19:24
@c5346163 c5346163 marked this pull request as ready for review February 12, 2026 07:57
Pucek9
Pucek9 previously approved these changes Feb 12, 2026
Copy link
Contributor

@Pucek9 Pucek9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

QA steps I did:
On Mac, opened the homepage and decreased the window height, typed "cam" in searchbox and saw carousel arrows; both work fine and no longer close the search results
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this can be breaking change for customers, example:
Customer registered event listener, something like: this.el.nativeElement.addEventListener('focus', this.onFocus, true); and implement some custom logic on focus.
When you are adding (mousedown)="preventDefault($event)" it will not be triggered.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rmch91 That's true, but the question that comes to mind is why would he do it in such a complicated way? If he extends the class, that forces him to have its own HTML structure (which will not be automatically updated from here). The fact that we cannot fix the behavior in his code - it's beyond our control if there is any customization, the question is only whether we are able to break something in his code/ui behavior this way?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User can do it without any customization of the component. just register an event listener on cx-carousel in app.component and apply his own logic.
After this change it will not work. So seems that it is breaking

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made the fix opt-in via a preventNavigationFocus input flag (defaults to false), so it's only enabled in search-box and doesn't affect existing carousels or customer event listeners.

@github-actions github-actions bot marked this pull request as draft February 13, 2026 14:31
@c5346163 c5346163 marked this pull request as ready for review February 13, 2026 14:56
@c5346163 c5346163 requested review from Pucek9 and rmch91 February 13, 2026 15:21
@github-actions github-actions bot marked this pull request as draft February 18, 2026 11:43
@c5346163 c5346163 marked this pull request as ready for review February 18, 2026 11:52
@github-actions github-actions bot marked this pull request as draft February 18, 2026 12:29
@c5346163 c5346163 marked this pull request as ready for review February 18, 2026 12:41
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions bot marked this pull request as draft February 18, 2026 13:37
@c5346163 c5346163 marked this pull request as ready for review February 19, 2026 10:25
@github-actions
Copy link
Contributor

Merge Checks Failed

Please push a commit to re-trigger the build.
To push an empty commit you can use `git commit --allow-empty -m "Trigger Build"`

@github-actions github-actions bot marked this pull request as draft February 19, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments