Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix __addScrollListeners for polyfilled browsers #263

Merged
merged 1 commit into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified iron-overlay-behavior.d.ts
Whitespace-only changes.
2 changes: 1 addition & 1 deletion iron-overlay-behavior.html
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
this.__rootNodes = [];
// Listen for scroll events in all shadowRoots hosting this overlay only
// when in native ShadowDOM.
if ('attachShadow' in Element.prototype && 'getRootNode' in Element.prototype) {
if (Polymer.Settings.useShadow) {
var node = this;
while (node) {
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && node.host) {
Expand Down
13 changes: 12 additions & 1 deletion test/iron-overlay-behavior-scroll-actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@

suite('scroll actions in shadow root', function() {

suiteSetup(function() {
if (!Polymer.Settings.useShadow) {
this.skip();
}
});

var scrollable, overlay;
setup(function() {
var f = fixture('scrollable');
Expand Down Expand Up @@ -294,6 +300,12 @@

suite('scroll actions in shadow root, overlay distributed', function() {

suiteSetup(function() {
if (!Polymer.Settings.useShadow) {
this.skip();
}
});

var scrollable, overlay;
setup(function() {
var f = fixture('scrollable');
Expand Down Expand Up @@ -351,7 +363,6 @@
dispatchScroll(scrollable, 0, 10);
});
});

});
</script>

Expand Down