Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

fix: make overlay display over backdrop, by appending overlay to body #165

Closed
wants to merge 2 commits into from
Closed
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
20 changes: 20 additions & 0 deletions iron-overlay-behavior.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,22 @@
type: Boolean
},

/**
* Set to true for this overlay to remain a child of its original
* parent element.
*
* By default, this overlay element appends both its overlay
* and its backdrop as an immediate child of the `body` element.
*
* If you want to keep the overlay as a child of its original
* parent element, set `keepWithParent` to "true".
*/
keepWithParent: {
type: Boolean,
default: false,
notify: true
},

/**
* Set to true to disable auto-focusing the overlay or child nodes with
* the `autofocus` attribute` when the overlay is opened.
Expand Down Expand Up @@ -246,6 +262,10 @@
},

attached: function() {
// Append overlay to body element
if (this.keepWithParent !== true) {
Polymer.dom(document.body).appendChild(this);
}
// Call _openedChanged here so that position can be computed correctly.
if (this.opened) {
this._openedChanged();
Expand Down