RunestoneInteractive / rs

A New Monorepo structure for Runestone
Other
40 stars 66 forks source link

Can't drag onto math in matching problem #521

Closed oscarlevin closed 1 month ago

oscarlevin commented 2 months ago

See for example Exercise 2.: Matching Problem, Derivatives in the sample book. If you drag an item from the left to the right, you can drop it, but only if you are not over some mathjax. This is especially tricky when the math on the right takes up the entire region.

The same thing happens when the <response> is authored with a <p> (which I'm not sure is valid anyway, but is how I discovered it). So I suspect this is something about nested spans or divs.

bnmnetp commented 1 month ago

Interesting.... will take some research to figure out what the solution is.

bnmnetp commented 1 month ago

This may be a solution... https://stackoverflow.com/questions/27731945/drag-and-drop-zone-with-child-nodes

bnmnetp commented 1 month ago

The CSS trick mentioned in the stack overflow linked above works great. I've added it to the drag-n-drop css file and it should be functional int he next release.