提交 0945f076 编写于 作者: R rebornix

re #103454. notebook/comment/find.

上级 f99ff58d
......@@ -402,13 +402,13 @@ export abstract class SimpleFindReplaceWidget extends Widget {
public hide(): void {
if (this._isVisible) {
dom.removeClass(this._domNode, 'visible-transition');
this._domNode.classList.remove('visible-transition');
this._domNode.setAttribute('aria-hidden', 'true');
// Need to delay toggling visibility until after Transition, then visibility hidden - removes from tabIndex list
setTimeout(() => {
this._isVisible = false;
this.updateButtons(this.foundMatch);
dom.removeClass(this._domNode, 'visible');
this._domNode.classList.remove('visible');
}, 200);
}
}
......
......@@ -235,13 +235,13 @@ export abstract class SimpleFindWidget extends Widget {
public hide(): void {
if (this._isVisible) {
dom.removeClass(this._innerDomNode, 'visible-transition');
this._innerDomNode.classList.remove('visible-transition');
this._innerDomNode.setAttribute('aria-hidden', 'true');
// Need to delay toggling visibility until after Transition, then visibility hidden - removes from tabIndex list
setTimeout(() => {
this._isVisible = false;
this.updateButtons(this.foundMatch);
dom.removeClass(this._innerDomNode, 'visible');
this._innerDomNode.classList.remove('visible');
}, 200);
}
}
......
......@@ -521,7 +521,7 @@ export class CommentNode extends Disposable {
if (!this._clearTimeout) {
dom.addClass(this.domNode, 'focus');
this._clearTimeout = setTimeout(() => {
dom.removeClass(this.domNode, 'focus');
this.domNode.classList.remove('focus');
}, 3000);
}
}
......
......@@ -721,8 +721,8 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
this._disposables.add(dom.addDisposableListener(this._reviewThreadReplyButton, 'focus', _ => this.expandReplyArea()));
this._commentEditor.onDidBlurEditorWidget(() => {
if (this._commentEditor.getModel()!.getValueLength() === 0 && this._commentForm.classList.add('expand')) {
dom.removeClass(this._commentForm, 'expand');
if (this._commentEditor.getModel()!.getValueLength() === 0 && this._commentForm.classList.contains('expand')) {
this._commentForm.classList.remove('expand');
}
});
}
......
......@@ -1771,15 +1771,15 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
}
toggleClassName(className: string) {
DOM.toggleClass(this._overlayContainer, className);
this._overlayContainer.classList.toggle(className);
}
addClassName(className: string) {
DOM.addClass(this._overlayContainer, className);
this._overlayContainer.classList.add(className);
}
removeClassName(className: string) {
DOM.removeClass(this._overlayContainer, className);
this._overlayContainer.classList.remove(className);
}
......
......@@ -1083,9 +1083,9 @@ export class ListTopCellToolbar extends Disposable {
private updateClass() {
if (this.notebookEditor.viewModel?.length === 0) {
DOM.addClass(this.topCellToolbar, 'emptyNotebook');
this.topCellToolbar.classList.add('emptyNotebook');
} else {
DOM.removeClass(this.topCellToolbar, 'emptyNotebook');
this.topCellToolbar.classList.remove('emptyNotebook');
}
}
......
......@@ -233,7 +233,7 @@ export class CodeCell extends Disposable {
e.removed.forEach(options => {
if (options.className) {
DOM.removeClass(templateData.rootContainer, options.className);
templateData.rootContainer.classList.remove(options.className);
}
if (options.outputClassName) {
......
......@@ -115,7 +115,7 @@ export class StatefulMarkdownCell extends Disposable {
e.removed.forEach(options => {
if (options.className) {
DOM.removeClass(templateData.rootContainer, options.className);
templateData.rootContainer.classList.remove(options.className);
}
});
}));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册