Skip to content

Commit

Permalink
Fixes #114 | Add test for filtering aria-grabbed elements in selector…
Browse files Browse the repository at this point in the history
…s in Drag.toElements_
  • Loading branch information
p2kmgcl authored and diegonvs committed Jan 10, 2019
1 parent fcd4a81 commit 3fcf3ef
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/metal-drag-drop/test/Drag.js
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,18 @@ describe('Drag', function() {
assert.deepEqual([scroll, scroll2, document], drag.scrollContainers);
});

it('should avoid aria grabbled elements in scrollContainers', function() {
let scroll = document.querySelector('.scroll');
scroll.setAttribute('aria-grabbed', 'true');

drag = new Drag({
scrollContainers: '.scroll',
sources: item,
});

assert.deepEqual([document], drag.scrollContainers);
});

it('should support "scrollContainers" complex selectors', function() {
let scroll = document.querySelector('.scroll');
let scroll2 = scroll.cloneNode(true);
Expand Down

0 comments on commit 3fcf3ef

Please sign in to comment.