* Update padding-bottom on the containing page to not hide any content * behind the popup, if rendered at the bottom. For centered dialogs, there * should be no added padding. * @param {number} newHeight * @private
(newHeight)
| 11283 | * @private |
| 11284 | */ |
| 11285 | updatePaddingToHtml_(newHeight) { |
| 11286 | if (this.shouldPositionCenter_()) { |
| 11287 | // For centered dialogs, there should be no bottom padding. |
| 11288 | this.removePaddingToHtml_(); |
| 11289 | return; |
| 11290 | } |
| 11291 | const bottomPadding = newHeight + 20; // Add some extra padding. |
| 11292 | const htmlElement = this.doc_.getRootElement(); |
| 11293 | setImportantStyles$1(htmlElement, { |
| 11294 | 'padding-bottom': `${bottomPadding}px`, |
| 11295 | }); |
| 11296 | } |
| 11297 | |
| 11298 | /** |
| 11299 | * Removes previouly added bottom padding from the document. |
no test coverage detected