There are 2-3 more grids such as “A” and “B” grids, they are opened according to their order of operation. Grid “A” is the main grid. However, the idx numbers of all of them change each time the grid is opened.
Before b is opened, grid a is idx=2, but since grid b is opened, grid a becomes 3 and b becomes 2. When grid c is opened, grid a becomes 2 again, grid c 1, grid 3 b.
I click on grid A, but when grid c b is opened, click goes to grid b.
I have to go back to the beginning every time there is a loop.