Skip to content

Commit

Permalink
fix: picker control only trigger tip on icon
Browse files Browse the repository at this point in the history
  • Loading branch information
zzxming committed Jan 16, 2025
1 parent 998a3e7 commit ceafb3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class QuillToolbarTip {
}

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

destroyAllTips() {
Expand Down

0 comments on commit ceafb3d

Please sign in to comment.