aemsites / volvotrucks-na

Helix site for VolvoTrucks NA
https://www.volvotrucks.*
1 stars 0 forks source link

Defect: FE: Logic to highlight the query term only works fine if is a single word term, it fails in case of multiple words in query term #110

Open girishdigrajkar opened 2 days ago

girishdigrajkar commented 2 days ago

Issue Type

Defect

Summary

Search functionality

Priority

Low

Description

Logic to highlight the query term only works fine if is a single word term. because the addEmTag function in template.js in the search block is comparing strings, then if the query term has more than 1 word, the logic breaks,

Affected Device Classes

No response

Affected Browsers/Devices and Versions

All

Steps to Reproduce

  1. Navigate to https://main--volvotrucks-us--volvogroup.aem.page/ ( OR https://792-new-search-endpoint--volvotrucks-us--volvogroup.aem.page/ )
  2. Search with single word and check results
  3. Search with multiple words and check results

Expected Results

Search should highlight the query term successfully

Actual Results

Search highlights the query term successfully in case of single word however, fails to highlight query term in case of multiple words.

Attachment

Single word search query term works fine as highlighted successfully:

image

Multiple word search query term is not highlighted:

Screenshot 2024-11-13 at 7 33 38 PM