From 938c63e922e4ebc9fb859626a95060992137aecb Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Mon, 23 Jul 2018 12:50:40 +0200 Subject: [PATCH 1/2] click event needs bubble in tests. Fixes #682 --- test/toggling-dropdown.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/toggling-dropdown.html b/test/toggling-dropdown.html index eceab24a7..b9a5dff7e 100644 --- a/test/toggling-dropdown.html +++ b/test/toggling-dropdown.html @@ -308,7 +308,7 @@ }); it('dropdown should not be shown when disabled', () => { - combobox.inputElement.dispatchEvent(new CustomEvent('click')); + combobox.inputElement.dispatchEvent(new CustomEvent('click', {bubbles: true, composed: true})); expect(combobox.opened).to.be.false; }); }); @@ -328,7 +328,7 @@ }); it('dropdown should not be shown when read-only', () => { - combobox.inputElement.dispatchEvent(new CustomEvent('click')); + combobox.inputElement.dispatchEvent(new CustomEvent('click', {bubbles: true, composed: true})); expect(combobox.opened).to.be.false; }); }); From 36367b4a0ab57d06b92b3eb9a38785e46a18e074 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Mon, 23 Jul 2018 12:56:54 +0200 Subject: [PATCH 2/2] Do not open if filteredItems is empty. Fixes https://github.com/vaadin/vaadin-time-picker/issues/58 --- src/vaadin-combo-box-dropdown-wrapper.html | 13 +++++++++++-- src/vaadin-combo-box-mixin.html | 7 +++++-- test/overlay-position.html | 2 +- test/toggling-dropdown.html | 10 ++++++++++ 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/vaadin-combo-box-dropdown-wrapper.html b/src/vaadin-combo-box-dropdown-wrapper.html index 969d2652d..606616699 100644 --- a/src/vaadin-combo-box-dropdown-wrapper.html +++ b/src/vaadin-combo-box-dropdown-wrapper.html @@ -28,7 +28,6 @@ }