Revert "Cancel native tap events in gr-dropdown"
This reverts commit 112a9e95fa41a3d65f6a543cdd19ef12eb86c22e. This broke navigation, ie CHANGES, YOUR, etc. drop down buttons. Bug: Issue 9344 Change-Id: I6dbe293b0343fa144e17daa95536a29a65020a43
This commit is contained in:
parent
59c8e6bab1
commit
d7116e12c5
@ -78,10 +78,6 @@
|
||||
},
|
||||
},
|
||||
|
||||
listeners: {
|
||||
tap: '_handleTap',
|
||||
},
|
||||
|
||||
behaviors: [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
@ -294,10 +290,5 @@
|
||||
_computeIsDownload(link) {
|
||||
return !!link.download;
|
||||
},
|
||||
|
||||
_handleTap(e) {
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
},
|
||||
});
|
||||
})();
|
||||
|
@ -112,21 +112,16 @@ limitations under the License.
|
||||
});
|
||||
|
||||
test('non link items', () => {
|
||||
const nativeTapHandler = sandbox.stub();
|
||||
const item0 = {name: 'item one', id: 'foo'};
|
||||
element.items = [item0, {name: 'item two', id: 'bar'}];
|
||||
const fooTapped = sandbox.stub();
|
||||
const tapped = sandbox.stub();
|
||||
element.addEventListener('tap-item-foo', fooTapped);
|
||||
element.addEventListener('tap-item', tapped);
|
||||
element.addEventListener('tap', nativeTapHandler);
|
||||
flushAsynchronousOperations();
|
||||
|
||||
MockInteractions.tap(element.$$('.itemAction'));
|
||||
assert.isTrue(fooTapped.called);
|
||||
assert.isTrue(tapped.called);
|
||||
assert.isFalse(nativeTapHandler.called);
|
||||
|
||||
assert.deepEqual(tapped.lastCall.args[0].detail, item0);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user