Closed corburn closed 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).
@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.
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 :(
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.