Skip to content

Commit

Permalink
Phantom-oriented fix for input.is(‘:focus’) always returning false an…
Browse files Browse the repository at this point in the history
…d causing an infinite loop

Addresses ariya/phantomjs#10427
  • Loading branch information
markdicksonjr authored and pauln committed May 28, 2018
1 parent 71762be commit 00b13cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/components/paper-chips.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default Component.extend({

this.set('focusedElement', 'input');

if (!this.get('content').length && !input.is(':focus')) {
if (!this.get('content').length && !input.is(':focus') && input[0] !== document.activeElement) {
input.focus();
} else {
this.set('activeChip', -1);
Expand Down

0 comments on commit 00b13cd

Please sign in to comment.