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

focus cell button doesn't scroll if cell is already active #65

Open jairideout opened 8 years ago

jairideout commented 8 years ago

Bug Description If the cell you wish to focus on is already active but not visible, the spreadsheet doesn't scroll to the cell, making the cell focus button appear unresponsive. Sheet.setActiveSelection does not scroll to the active selection if the selection is already active but not visible on-screen.

Small sample script that reliably reproduces the issue The sample should run as-is or with minimal setup, without external dependencies.

function scrollBug() { SpreadsheetApp.getActiveSheet().setActiveSelection("X470"); };

Steps to Reproduce Behavior

  1. Create a new spreadsheet. You don't need to enter any data, fine to leave empty.
  2. Run scrollBug function defined above from script editor. Notice that the active cell is now X470 and it is visible on-screen (as expected).
  3. Without changing the active cell, scroll in the spreadsheet so that cell X470 isn't visible on-screen anymore.
  4. Run scrollBug function again. Notice that the active cell is still X470 but isn't visible on-screen (scrolling didn't happen).

Expected Behavior I'd expect to see step 4 (above) scroll so that cell X470 is visible on-screen, even if that cell is already active. Instead, cell X470 is active but not visible on-screen.

Comments Project key (found under "File > Project properties"): MmODIcgMH45sSC8x3kMR-IdNe5WnWB3vw

jairideout commented 8 years ago

Spent some time today trying to fix this. I think it may be a bug in Google Apps Script. I submitted an issue here.