mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-18 02:12:30 +08:00
Comments: Fixed display, added archive list support for editor toolbox
Some checks failed
lint-php / build (push) Has been cancelled
test-js / build (push) Has been cancelled
analyse-php / build (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
Some checks failed
lint-php / build (push) Has been cancelled
test-js / build (push) Has been cancelled
analyse-php / build (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
This commit is contained in:
@ -34,13 +34,26 @@ export class PageCommentReference extends Component {
|
||||
window.addEventListener('editor-toolbox-change', (event) => {
|
||||
const tabName: string = (event as {detail: {tab: string, open: boolean}}).detail.tab;
|
||||
const isOpen = (event as {detail: {tab: string, open: boolean}}).detail.open;
|
||||
if (tabName === 'comments' && isOpen) {
|
||||
if (tabName === 'comments' && isOpen && this.link.checkVisibility()) {
|
||||
this.showForEditor();
|
||||
} else {
|
||||
this.hideMarker();
|
||||
}
|
||||
});
|
||||
|
||||
// Handle visibility changes within editor toolbox archived details dropdown
|
||||
window.addEventListener('toggle', event => {
|
||||
if (event.target instanceof HTMLElement && event.target.contains(this.link)) {
|
||||
window.requestAnimationFrame(() => {
|
||||
if (this.link.checkVisibility()) {
|
||||
this.showForEditor();
|
||||
} else {
|
||||
this.hideMarker();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {capture: true});
|
||||
|
||||
// Handle comments tab changes to hide/show markers & indicators
|
||||
window.addEventListener('tabs-change', event => {
|
||||
const sectionId = (event as {detail: {showing: string}}).detail.showing;
|
||||
|
Reference in New Issue
Block a user