You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thorium 2.4.x : on MacOS (probably other OS too) mouse click + mod keys on React router links in GUI trigger new blank window or download (e.g. localhost in dev, library_index.html in prod)
#2233
Closed
danielweck opened this issue
May 17, 2024
· 1 comment
@panaC we observed this in Thorium3 too, probably a React Router breaking change (event.preventDefault() handling). So, we can't fix this in 2.4.x but we have to make sure this doesn't happen in 3.x.x
The text was updated successfully, but these errors were encountered:
I checked possible occurrences of this undesirable behaviour in Thorium3. Basically, any "a" hyperlink element with "href" attribute (even empty) activates behaviours that otherwise remain dormant, such as keyboard tab stop, ENTER key handling, onClick event listener (and its counterpart onDoubleClick), "visited" CSS pseudo class, role of SHIFT and ALT/OPT keys which trigger download or external window target (CTRL triggers context menu in dev mode), etc.. I documented the behaviours inline the relevant TypeScript code. Usually, event.preventDefault() suffices and makes logical sense as Thorium mostly performs custom hyperlink handling, or delegates to the local / default web browser via an Electron API. Note that "button" elements inside (or not inside) forms also come with their own behaviours, I reviewed that too in Thorium3. However there remains the issue of some GUI controls being "a" when they could be "button" elements, or vice-versa (there is a semantic distinction of course, as well as practical considerations such as the role of the SPACE key (scroll viewport, vs. activate a button onClick). I tested all with screen reader (Voice Over on Mac). Anyway, closing this now.
@panaC we observed this in Thorium3 too, probably a React Router breaking change (event.preventDefault() handling). So, we can't fix this in 2.4.x but we have to make sure this doesn't happen in 3.x.x
The text was updated successfully, but these errors were encountered: