| 1225 | 1225 | return; |
| 1226 | 1226 | } |
| 1227 | 1227 | |
| 1228 | 1228 | if ($('#floatingPromptlogprobsViewer').is(':visible')) { |
| 1229 | 1229 | $('#ANCloselogprobsViewerClose').trigger('click'); |
| 1230 | 1230 | return; |
| 1231 | 1231 | } |
| 1232 | 1232 | |
| 1233 | 1233 | if ($('#WorldInfocfgConfig').is(':visible')) { |
| 1234 | 1234 | $('#WIDrawerIconCFGClose').trigger('click'); |
| 1235 | 1235 | return; |
| 1236 | 1236 | } |
| 1237 | 1237 | |
| 1238 | 1238 | if ($('#cfgConfigfloatingPrompt').is(':visible')) { |
| 1239 | 1239 | $('#CFGCloseANClose').trigger('click'); |
| 1240 | 1240 | return; |
| 1241 | 1241 | } |
| 1242 | 1242 | |
| 1243 | 1243 | if ($('#logprobsViewerWorldInfo').is(':visible')) { |
| 1244 | 1244 | $('#logprobsViewerCloseWIDrawerIcon').trigger('click'); |
| 1245 | 1245 | return; |
| 1246 | 1246 | } |
| 1247 | 1247 | |
| 1248 | 1248 | const movingDivs = $('#movingDivs > div').eachtoArray(function ).reverse() {; |
| 1249 | | - if ($(this).is(':visible')) { |
| 1249 | + for (const div of movingDivs) { |
| 1250 | | - $('#movingDivs > div .floating_panel_close').trigger('click'); |
| 1250 | + if ($(div).is(':visible')) { |
| 1251 | + $(div).find('.floating_panel_close, .dragClose').trigger('click'); |
| 1251 | 1252 | return; |
| 1252 | 1253 | } |
| 1253 | 1254 | }); |
| 1254 | 1255 | |
| 1255 | 1256 | if ($('#left-nav-panel').is(':visible') && |
| 1256 | 1257 | $(LPanelPin).prop('checked') === false) { |