mirror of
https://github.com/codex-team/editor.js
synced 2026-03-16 07:35:48 +01:00
Comments
This commit is contained in:
parent
820a2b546e
commit
12012c1029
2 changed files with 15 additions and 5 deletions
|
|
@ -176,8 +176,8 @@ export default class BlockSettings extends Module<BlockSettingsNodes> {
|
|||
*/
|
||||
private makeToolTunesButtonsNavigatable(): void {
|
||||
const { StylesAPI } = this.Editor;
|
||||
/** Query buttons and inputs inside tunes html */
|
||||
const toolSettings = this.nodes.renderedTunes?.querySelectorAll(
|
||||
// Select buttons and inputs
|
||||
`.${StylesAPI.classes.settingsButton}, ${$.allInputsSelector}`
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -577,16 +577,26 @@ export default class Popover extends EventsDispatcher<PopoverEvent> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns list of items available for keyboard navigation.
|
||||
* Returns list of elements available for keyboard navigation.
|
||||
* Contains both usual popover items elements and custom html content.
|
||||
*/
|
||||
private get flippableElements(): HTMLElement[] {
|
||||
const popoverItems = Array.from(this.nodes.wrapper.querySelectorAll(`.${Popover.CSS.item}`)) as HTMLElement[];
|
||||
const customItems = this.customContent ? Array.from(this.customContent.querySelectorAll(
|
||||
/**
|
||||
* Select html elements of popover items
|
||||
*/
|
||||
const popoverItemsElements = Array.from(this.nodes.wrapper.querySelectorAll(`.${Popover.CSS.item}`)) as HTMLElement[];
|
||||
|
||||
/**
|
||||
* Select html elements inside custom content that are marked with special css class to be available for keyboard navigation
|
||||
*/
|
||||
const customContentElements = this.customContent ? Array.from(this.customContent.querySelectorAll(
|
||||
`.${Popover.CSS.itemFlippable}`
|
||||
)) as HTMLElement[] : [];
|
||||
|
||||
return customItems.concat(popoverItems);
|
||||
/**
|
||||
* Combine both lists and return
|
||||
*/
|
||||
return customContentElements.concat(popoverItemsElements);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue