Skip to content

Commit 14cc2c5

Browse files
Stop using non-standard search event evolution dashboard (#441)
The next version of Safari removes the non-standard search event. This causes the search field on the evolution dashboard to stop working. The issue can be reproduced in Safari Technology Preview and Firefox. This fix makes two changes: - Uses the standard 'input' event instead of 'search' event - Removes the non-standard 'incremental' attribute The input event triggers the event listener on each change of input. The behavior with this fix is unchanged to the behavior in the current Safari version. Tested on macOS 14.1 in Safari, Chrome, Firefox, and Safari Technology Preview. Fixes #440
1 parent 1cace59 commit 14cc2c5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

assets/javascripts/swift-evolution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ function addEventListeners() {
580580
var searchInput = document.querySelector('#search-filter')
581581

582582
// Typing in the search field causes the filter to be reapplied.
583-
searchInput.addEventListener('search', filterProposals)
583+
searchInput.addEventListener('input', filterProposals)
584584

585585
// Each of the individual statuses needs to trigger filtering as well
586586
;[].forEach.call(document.querySelectorAll('.filter-list input'), function (element) {

swift-evolution/_dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<section class="evolution-dashboard">
22
<div class="search-bar">
3-
<input id="search-filter" class="filter" title="Search proposals" placeholder="Search" type="search" incremental />
3+
<input id="search-filter" class="filter" title="Search proposals" placeholder="Search" type="search" />
44

55
<div class="filter-container">
66
<span role="button" id="status-filter-button" class="filter-button" aria-label="Toggle status filtering options" aria-pressed="false" tabindex="0" title="Toggle proposal status filter">

0 commit comments

Comments
 (0)