From 6b956c336c810471a9e47bbe479e2da5f2e8db4c Mon Sep 17 00:00:00 2001 From: kernc Date: Sat, 23 Jun 2018 19:36:28 +0200 Subject: [PATCH] Demos: Autocomplete, multiple: scroll input to the right on addition Exposes the last added item in narrow containers. --- demos/autocomplete/multiple.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demos/autocomplete/multiple.html b/demos/autocomplete/multiple.html index 829af15ce..a799a49c0 100644 --- a/demos/autocomplete/multiple.html +++ b/demos/autocomplete/multiple.html @@ -67,6 +67,8 @@ // add placeholder to get the comma-and-space at the end terms.push( "" ); this.value = terms.join( ", " ); + // scroll input viewport to as far right as possible + this.selectionStart = this.selectionEnd = this.value.length; return false; } });