qiime2 / Keemei

Validate tabular bioinformatics file formats in Google Sheets
https://keemei.qiime2.org
BSD 3-Clause "New" or "Revised" License
5 stars 20 forks source link

fix #65 focus does not scroll if cell is already active #78

Closed corburn closed 7 years ago

corburn commented 7 years ago

The spreadsheet will not scroll to the target cell if the cell is already active. This solution patches the issue by selecting a different cell before selecting the target cell.

jairideout commented 7 years ago

Thanks for the fix @corburn! I tested this locally and noticed that there's a display artifact where the active cell will change to another cell and then back to the intended target. I considered implementing this hack earlier when I first noticed the bug, but decided to wait on Google to fix the bug upstream (they appeared to have noticed it because it was categorized as a bug). I'd prefer to wait for a fix rather than have the active cell jump back and forth (it's also a bit slower because an additional call to setActiveSelection is necessary, and that API is really slow for some reason).

corburn commented 7 years ago

@jairideout thanks for testing the fix and letting me know about the display artifact. I did not see it and would have probably otherwise used this on different project.

jairideout commented 7 years ago

I think the display artifact may not show up in certain cases, depending on how Google is batching its spreadsheet operations behind the scenes. Maybe that was why you didn't see it on your end. For me it was happening quite a bit unfortunately.

If you have any other ideas for a fix I'd love to hear them! This is a pretty annoying bug :(