Skip to content

Commit

Permalink
Revert "fix: picker control only trigger tip on icon (#6)" (#7)
Browse files Browse the repository at this point in the history
This reverts commit b16465b.
  • Loading branch information
zzxming authored Jan 16, 2025
1 parent b16465b commit 073d447
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export class QuillToolbarTip {
}
const targetLabel = this.getControlLabel(toolControlItem);
if (!targetLabel || (isUndefined(currentControlOption) && isUndefined(parentOptions))) continue;
console.log(targetLabel);
const instance = createTooltip(targetLabel, {
...this.options.defaultTooltipOptions,
...currentControlOption,
Expand All @@ -84,7 +83,7 @@ export class QuillToolbarTip {
}

getControlLabel([_, target]: [ string, HTMLButtonElement | HTMLSelectElement]) {
return target.tagName.toLowerCase() === 'button' ? target : target.previousElementSibling!.querySelector('.ql-picker-label') as HTMLElement | null;
return target.tagName.toLowerCase() === 'button' ? target : target.previousElementSibling as HTMLElement | null;
}

destroyAllTips() {
Expand Down

0 comments on commit 073d447

Please sign in to comment.