Skip to content

Commit

Permalink
closes #589. prevent eps from ignoring selections when the cursor did…
Browse files Browse the repository at this point in the history
… not move.
  • Loading branch information
miguelcobain committed Feb 18, 2020
1 parent 70cbb9f commit ff9843a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions addon/components/paper-select/options/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ import { computed } from '@ember/object';
@layout(template)
class PaperSelectOptions extends PowerSelectOptions {

get select() {
return this._select;
}

/**
* This is an ugly hack to avoid eps from ignoring
* a selection if the cursor didn't move. There is currently no
* public way way to avoid this check. By not passing in the select event
* this check is not done.
*/
set select(value) {
let originalChoose = value.actions.choose;
value.actions.choose = (selected) => originalChoose(selected);
this._select = value;
}

attributeBindings = ['role:role', 'ariaControls:aria-controls'];

role = 'listbox';
Expand Down

0 comments on commit ff9843a

Please sign in to comment.