| 396 | 396 | } |
| 397 | 397 | |
| 398 | 398 | //show AN if it's hidden |
| 399 | | - if ($('#floatingPrompt').css('display') !== 'flex') { |
| 399 | + const $ANcontainer = $('#floatingPrompt'); |
| 400 | | - $('#floatingPrompt').addClass('resizing'); |
| 400 | + if ($ANcontainer.css('display') !== 'flex') { |
| 401 | 401 | $('#floatingPrompt')ANcontainer.cssaddClass('display', 'flexresizing'); |
| 402 | 402 | $('#floatingPrompt')ANcontainer.css('opacitydisplay', 0.0'flex'); |
| 403 | | - $('#floatingPrompt').transition({ |
| 403 | + $ANcontainer.css('opacity', 0.0); |
| 404 | + $ANcontainer.transition({ |
| 405 | + height: 'unset', //AN gets height: 0 from CSS LN 5363 for .drawer-content |
| 404 | 406 | opacity: 1.0, |
| 405 | 407 | duration: animation_duration, |
| 406 | 408 | }, async function () { |
| 407 | 409 | await delay(50); |
| 408 | 410 | $('#floatingPrompt')ANcontainer.removeClass('resizing'); |
| 409 | 411 | }); |
| 410 | 412 | |
| 411 | 413 | //auto-open the main AN inline drawer |
| 412 | 414 | if ($('#ANBlockToggle') |
| 413 | 415 | .siblings('.inline-drawer-content') |
| 414 | 416 | .css('display') !== 'block') { |
| 415 | 417 | $('#floatingPrompt')ANcontainer.addClass('resizing'); |
| 416 | 418 | $('#ANBlockToggle').clicktrigger('click'); |
| 417 | 419 | } |
| 418 | 420 | } else { |
| 419 | 421 | //hide AN if it's already displayed |
| 420 | 422 | $('#floatingPrompt')ANcontainer.addClass('resizing'); |
| 421 | 423 | $('#floatingPrompt')ANcontainer.transition({ |
| 422 | 424 | opacity: 0.0, |
| 423 | 425 | duration: animation_duration, |
| 424 | 426 | }, async function () { |
| 425 | 427 | await delay(50); |
| 426 | 428 | $('#floatingPrompt')ANcontainer.removeClass('resizing'); |
| 427 | 429 | }); |
| 428 | 430 | setTimeout(function () { |
| 429 | 431 | $('#floatingPrompt')ANcontainer.hide(); |
| 430 | 432 | }, animation_duration); |
| 431 | 433 | } |
| 432 | 434 | |