Carefully check for tooltip in Run-Stop button group

Fixes CODEOCEAN-FRONTEND-5C
This commit is contained in:
Sebastian Serth
2023-11-17 14:45:56 +01:00
parent c18aadaf61
commit ce6470cd72

View File

@ -685,7 +685,11 @@ var CodeOceanEditor = {
$('#start-over-active-file').prop('disabled', this.active_frame.data('role') === 'user_defined_file' || this.active_frame.data('read-only') !== undefined);
$('#dummy').toggle(!this.fileActionsAvailable());
$('#render').toggle(this.isActiveFileRenderable());
$('#run-stop-button-group').tooltip('hide').toggleClass('flex-grow-1', this.isActiveFileRunnable() || this.isActiveFileStoppable());
const runStopGroup = $('#run-stop-button-group');
if (typeof runStopGroup.tooltip === 'function') {
runStopGroup.tooltip('hide');
}
runStopGroup.toggleClass('flex-grow-1', this.isActiveFileRunnable() || this.isActiveFileStoppable());
$('#run').toggle(this.isActiveFileRunnable() && !this.running);
$('#stop').toggle(this.isActiveFileStoppable());
$('#test').toggle(this.isActiveFileTestable());