fix bio length autosizing
This commit is contained in:
		
							parent
							
								
									fcc5feceab
								
							
						
					
					
						commit
						46566ffcb6
					
				
					 1 changed files with 11 additions and 6 deletions
				
			
		| 
						 | 
					@ -14,12 +14,6 @@ window.addEventListener('message', e => {
 | 
				
			||||||
      id: data.id,
 | 
					      id: data.id,
 | 
				
			||||||
      height: document.getElementsByTagName('html')[0].scrollHeight,
 | 
					      height: document.getElementsByTagName('html')[0].scrollHeight,
 | 
				
			||||||
    }, '*');
 | 
					    }, '*');
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (document.fonts && document.fonts.ready) {
 | 
					 | 
				
			||||||
      document.fonts.ready.then(sizeBioText);
 | 
					 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
      sizeBioText();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -85,6 +79,17 @@ function main() {
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        .catch(error => console.error(error));
 | 
					        .catch(error => console.error(error));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    [].forEach.call(document.querySelectorAll('[data-component="Card"]'), (content) => {
 | 
				
			||||||
 | 
					      const props = JSON.parse(content.getAttribute('data-props'));
 | 
				
			||||||
 | 
					      ReactDOM.render(<CardContainer locale={locale} {...props} />, content);
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (document.fonts && document.fonts.ready) {
 | 
				
			||||||
 | 
					      document.fonts.ready.then(sizeBioText);
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      sizeBioText();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  delegate(document, '.webapp-btn', 'click', ({ target, button }) => {
 | 
					  delegate(document, '.webapp-btn', 'click', ({ target, button }) => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue