             grid_focus = Utils.clone @state.grid_focus
             grid_focus.field_open = "none"
             @setState { grid_focus: grid_focus }
-            row = grid_focus.row
-            col = grid_focus.col
+            row = grid_focus.focus.row
+            col = grid_focus.focus.col
             newvalue = not @state.puzzle.grid[row][col].open
             op = Ot.opEditCellValue row, col, "open", newvalue
             if @state.maintainRotationalSymmetry

        grid_focus: @defaultGridFocus()

    defaultGridFocus: () ->
        row: 0
        col: 0
        is_across: true
        field_open: "none" # "none" or "number" or "contents"


                    return "open_cell"
                else
                    focus = @state.grid_focus
                    if focus.focus.row == row and focus.focus.col == col
                        return "open_cell_highlighted"
                    else if (\
                        (focus.is_across and focus.focus.row == row and \
                            ([col..focus.focus.col].every (col1) -> grid[row][col1].open)) or \
                        ((not focus.is_across) and focus.focus.col == col and \
                            ([row..focus.focus.row].every (row1) -> grid[row1][col].open)))
                        return "open_cell_highlighted_intermediate"
                    else
                        return "open_cell"
            else
                if (@state.grid_focus != null and @state.grid_focus.focus.row == row \
                        and @state.grid_focus.focus.col == col)
                    return "closed_cell_highlighted"
                else
                    return "closed_cell"
