LCL, grids, fix editor not focused if it's visible and grid is being focused, from Éderson Cássio, issue 24194

git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@40780 4005530d-fff6-0310-9dd1-cebe43e6787f