From 9d965312299efa2407ef3a307f5afac8692682fd Mon Sep 17 00:00:00 2001 From: Tobias Date: Wed, 8 May 2019 06:58:09 +0200 Subject: [PATCH] fix: fix #dropdown scrolling issue on touch devices --- packages/dnb-ui-lib/src/components/dropdown/Dropdown.js | 1 - .../src/components/dropdown/__tests__/Dropdown.test.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/dnb-ui-lib/src/components/dropdown/Dropdown.js b/packages/dnb-ui-lib/src/components/dropdown/Dropdown.js index 93991d88a8c..07f6c2ac200 100644 --- a/packages/dnb-ui-lib/src/components/dropdown/Dropdown.js +++ b/packages/dnb-ui-lib/src/components/dropdown/Dropdown.js @@ -747,7 +747,6 @@ export default class Dropdown extends Component { title={Dropdown.parseContentTitle(dataItem)} className="dnb-dropdown__option__inner" data-item={i} - onTouchStart={this.selectItemHandler} onMouseDown={this.selectItemHandler} role="button" tabIndex="-1" diff --git a/packages/dnb-ui-lib/src/components/dropdown/__tests__/Dropdown.test.js b/packages/dnb-ui-lib/src/components/dropdown/__tests__/Dropdown.test.js index 38599ba3f14..e673bf13136 100644 --- a/packages/dnb-ui-lib/src/components/dropdown/__tests__/Dropdown.test.js +++ b/packages/dnb-ui-lib/src/components/dropdown/__tests__/Dropdown.test.js @@ -140,7 +140,7 @@ describe('Dropdown component', () => { ) }) - it('has correct selected value', () => { + it('has correct selected value after new selection', () => { Comp.find('li.dnb-dropdown__option') .find('.dnb-dropdown__option__inner') .at(props.selected_item + 1)