Skip to content

Commit

Permalink
fix: add support for when dynamic button is rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
Soc Sieng committed Jun 23, 2020
1 parent 60a84e1 commit 3264778
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/button-manager.ts
Expand Up @@ -330,7 +330,7 @@ export class ButtonManager {
overflow: hidden;
}
${this.options.cssSelector}.fill > div,
${this.options.cssSelector}.fill > div > .gpay-button {
${this.options.cssSelector}.fill > div > button {
width: 100%;
height: inherit;
}
Expand All @@ -354,7 +354,7 @@ export class ButtonManager {

if (node && node instanceof ShadowRoot) {
const styles = document.querySelectorAll('head > style');
const gPayStyles = Array.from(styles).filter(s => s.innerHTML.indexOf('.gpay-button') !== -1);
const gPayStyles = Array.from(styles).filter(s => s.innerHTML.indexOf('.gpay-') !== -1);
const existingStyles = new Set(
Array.from(node.childNodes)
.filter(n => n instanceof HTMLElement && n.nodeName === 'STYLE' && n.id)
Expand Down

0 comments on commit 3264778

Please sign in to comment.