att / rcloud.dcplot

Dimensional charting (dc.js) for RCloud
6 stars 7 forks source link

WDCPLOT reset causes focus to go to top of page rather than stay within the plot area #12

Closed robert-a closed 9 years ago

robert-a commented 9 years ago

After selecting on a plot within wdcplot, then using the 'reset' to return to the full selection, the focus moves to the top of the page rather than within the wdcplot area. This is an issue when wdcplot is embedded in a larger page (e.g., in mini.html). Note, when re-clicking on the previous selection instead, it returns to the full selection without moving the focus, as would be expected/desired.

gordonwoodhull commented 9 years ago

Thanks for the report, @robert-a.

Do you mean the keyboard focus? Does the window scroll in response?

robert-a commented 9 years ago

Yes, the cursor and the window scroll back to the top.

gordonwoodhull commented 9 years ago

Hmm, I suspect this is more a problem with a link getting focus and then being deleted, than anything else. Still, I'll see if there's anything I can do about it.

robert-a commented 9 years ago

I think there is an href=”#”

gordonwoodhull commented 9 years ago

Oh, the event needs a .preventDefault() or something. Gotcha. Thanks!

gordonwoodhull commented 9 years ago

Fixed in 0.3