Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jairideout opened this issue Jan 22, 2016 · 1 comment
Open

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

jairideout opened this issue Jan 22, 2016 · 1 comment
Labels
type:bug Something is wrong.

Comments

@jairideout
Copy link
Member

jairideout commented Jan 22, 2016

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 jairideout added the type:bug Something is wrong. label Jan 22, 2016
@jairideout jairideout self-assigned this Jan 22, 2016
@jairideout jairideout removed their assignment Jan 22, 2016
@jairideout
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something is wrong.
Projects
None yet
Development

No branches or pull requests

1 participant