GMOD / jbrowse-components

Source code for JBrowse 2, a modern React-based genome browser
https://jbrowse.org/jb2
Apache License 2.0
205 stars 61 forks source link

Fix cursor:pointer style on an alignments feature detail clickable link #4438

Closed cmdcolin closed 3 months ago

cmdcolin commented 3 months ago

I noticed that code in the alignment details widget (plugins/alignments/src/AlignmentsFeatureDetail/SuppAlignmentsLocStrings.tsx) had links with mouseover where the cursor did not use the pointer style, which turns out to be due to missing href prop on the Link element. For Link elements without a true href (e.g. they are more link link buttons), we can use href="#" and then event.preventDefault in the handler.

The alternative is not having any href and then using the makeStyles to restore the cursor:pointer style, but i think the href="#" is a bit more idiomatic. Just gotta remember to event.preventDefault in those cases.