Skip to content

Commit 97dcc7d

Browse files
committed
fixed opening popup
1 parent 5a4dcc0 commit 97dcc7d

File tree

1 file changed

+6
-6
lines changed
  • src/addons/addons/ai-integration

1 file changed

+6
-6
lines changed

src/addons/addons/ai-integration/main.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ export default class main {
2828
*/
2929
static createBasePopup(fileAttachmentType = 0, inputValue = "") {
3030
fileAttachmentType = String(fileAttachmentType);
31-
if (document.querySelector('.container') != null || document.AI_INTEGRATION.popupOpen) { //reopen the popup
31+
if (document.getElementById("popupParentDiv") != null || document.AI_INTEGRATION.popupOpen) { //reopen the popup
3232
document.AI_INTEGRATION.popupOpen = true;
33-
document.querySelector('.container').style.display = '';
34-
document.querySelector('.container').style.zIndex = 509;
33+
document.getElementById("popupParentDiv").style.display = '';
34+
document.getElementById("popupParentDiv").style.zIndex = 509;
3535
//FINISH ADDING SUPPORT TO reopening popup
3636
var textareaa = document.getElementById('auto-resizing-textarea');
3737
//focus on textarea
@@ -663,9 +663,9 @@ export default class main {
663663
}
664664
let currentWidth = 150;
665665
for (var xx = 0; xx < document.getElementById(`CODEBLOCK_${randomId}_${i}`).children[0].children.length; xx++) { //each top level block
666-
if (document.querySelector('.container').style.display != "") {
667-
document.querySelector('.container').style.display = '';
668-
document.querySelector('.container').style.zIndex = 509;
666+
if (document.getElementById("popupParentDiv").style.display != "") {
667+
document.getElementById("popupParentDiv").style.display = '';
668+
document.getElementById("popupParentDiv").style.zIndex = 509;
669669
}
670670

671671
const currentElement = document.getElementById(`CODEBLOCK_${randomId}_${i}`).children[0].children[xx];

0 commit comments

Comments
 (0)