From 9bf543bc59f4915cd1df9b1636c1c85d7021db75 Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Fri, 9 Dec 2016 14:44:41 +0100 Subject: [PATCH] use the input event This will run on both regular text input, but also on things like pasting or dragging in text. Supported in IE9+ or something like that --- 06 - Type Ahead/index-FINISHED.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/06 - Type Ahead/index-FINISHED.html b/06 - Type Ahead/index-FINISHED.html index 53c36248b0..3b740415b3 100644 --- a/06 - Type Ahead/index-FINISHED.html +++ b/06 - Type Ahead/index-FINISHED.html @@ -53,8 +53,7 @@ const searchInput = document.querySelector('.search'); const suggestions = document.querySelector('.suggestions'); -searchInput.addEventListener('change', displayMatches); -searchInput.addEventListener('keyup', displayMatches); +searchInput.addEventListener('input', displayMatches);