diff --git a/src/InputHandler.ts b/src/InputHandler.ts index 3ec2aaf38..f2d977511 100644 --- a/src/InputHandler.ts +++ b/src/InputHandler.ts @@ -7,7 +7,6 @@ import { C0 } from './EscapeSequences'; import { DEFAULT_CHARSET } from './Charsets'; import { CharData } from './Types'; import { CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX } from './Buffer'; -import { BellSound } from './utils/Sounds'; /** * The terminal's standard implementation of IInputHandler, this handles all diff --git a/src/Terminal.ts b/src/Terminal.ts index 38235ee21..ac00f390f 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -2301,6 +2301,8 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT this.bellAudioElement.setAttribute('preload', 'auto'); this.bellAudioElement.setAttribute('src', this.options.bellSound); this.element.appendChild(this.bellAudioElement); + } else if (this.bellAudioElement) { + this.bellAudioElement.remove(); } } }