Skip to content

Commit f8083a1

Browse files
jacobloganJacob Logan
and
Jacob Logan
authored
update search comment (aws-amplify#7646)
Co-authored-by: Jacob Logan <[email protected]>
1 parent 3e382bd commit f8083a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/Layout/LayoutHeader.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ export const LayoutHeader = ({
5252
};
5353

5454
// Search result transform function that will strip out the pageMain anchor tag
55+
// Algolia search results include the anchor tag where the content was found but since we
56+
// are aggregating records this ends up always being the pageMain anchor tag which is the
57+
// page's main content section. This adds focus to the main content section on every search
58+
// and creates a funny user experience. Removing this tag will avoid that.
5559
const transformItems = (items) => {
5660
items.map((item) => {
5761
if (item.url.includes('#pageMain')) {

0 commit comments

Comments
 (0)