swiftlang/swift-org-website

Swift Evolution search input field is broken

Closed this issue · 10 comments

Describe the bug

Search input field at https://www.swift.org/swift-evolution/ no longer works.

To Reproduce

Steps to reproduce the behavior:

  1. Navigate to https://www.swift.org/swift-evolution/;
  2. Move input focus to the search field;
  3. Type any text.

Expected behavior

Evolution proposals filtered by a simple substring match are displayed.

Actual behavior

The list of evolution proposals doesn't change at all.

Screenshots

Screenshot 2023-11-07 at 15 03 37

Environment details

Desktop (please complete the following information):

  • OS: macOS Sonoma
  • Browser: tried Safari 17 and Firefox 119

Swift.org version/commit hash

1cace59

I am able to reproduce this in Firefox 119.0 and 119.0.1.
I am not able to reproduce it in Safari 17.1.
I am also not able to reproduce it in Chrome 118.0.5993.117.

This is on macOS 14.1.

@MaxDesiatov Are you on Safari 17.0 and macOS 14.0?

Looking for the discrepancy in reproducing this.

I'm on macOS 14.2 beta with whatever Safari version comes included.

This is not reproducing for me on the latest Chrome 119.0.6045.105.

I am able to reproduce in Safari Technology Preview
Release 182 (Safari 17.4, WebKit 19618.1.4.1)

It appears the event listener for the search field is not being called.

I'm on macOS 14.2 beta with whatever Safari version comes included.

Thanks, then it is likely the same issue I am seeing in the Safari Technology Preview.

The search field element is being found and the event listener is being attached.

The search field is using the non-standard ‘search’ event for its event listener. It looks like we should be using ‘input’ instead.

It looks like this was removed from WebKit with this commit:
Remove incremental attribute and search event

According to MDN, it looks like this event was never supported in Firefox:
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/search_event

It also looks like the incremental attribute is deprecated and can be removed.

I should have a PR with a fix shortly after I do some testing first.

Thank you for reporting this @MaxDesiatov! It should be working for you now.

I can confirm it's fixed, thanks for the prompt response!