Skip to content

Commit

Permalink
fix: user-select style and pre-create iframe in embed.js (langgenius#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cr-zhichen authored and JunXu01 committed Nov 9, 2024
1 parent a04fc52 commit f1de21c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
5 changes: 4 additions & 1 deletion web/public/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
box-shadow: rgba(150, 150, 150, 0.2) 0px 10px 30px 0px, rgba(150, 150, 150, 0.2) 0px 0px 0px 1px;
bottom: 5rem; right: 1rem; width: 24rem; max-width: calc(100vw - 2rem); height: 40rem;
max-height: calc(100vh - 6rem); border-radius: 0.75rem; display: flex; z-index: 2147483647;
overflow: hidden; left: unset; background-color: #F3F4F6;
overflow: hidden; left: unset; background-color: #F3F4F6;user-select: none;
`;

document.body.appendChild(iframe);
Expand Down Expand Up @@ -255,6 +255,9 @@
if (!document.getElementById(buttonId)) {
createButton();
}

createIframe();
document.getElementById(iframeId).style.display = 'none';
}

// Add esc Exit keyboard event triggered
Expand Down
32 changes: 31 additions & 1 deletion web/public/embed.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f1de21c

Please sign in to comment.