Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add attribute hover style is not applied #66

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Taskview/SearchBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,11 @@ export class SearchBar {
if (d.optionType === 'gene') {
// set global optionId
this._geneHoverOptionId = d.optionId;
const currentTarget = event.currentTarget as HTMLElement; // store current target as it becomes null by the time the timeout is executed
setTimeout(() => {
// update detail after timeout time global and current optionId is equal
if (d.optionId === this._geneHoverOptionId) {
this._mouseOverHandler(d, event.currentTarget);
this._mouseOverHandler(d, currentTarget);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might not be necessary, but you can also use it on line 311.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 311 only handles the case for non-genes. Ollie fixed the gene case here and the event might not be available after the timeout is executed. So I agree with the fix he proposed.

}
}, 200);
} else {
Expand Down
Loading