Expanded Rows not being selected

I'm trying to use the expanded row of the table as an area to edit row data in, but I'm having trouble when more than one row is expanded. Clicking on the expanded area does not select that row. Instead, the previously expanded row remains the selected row. I've tried creating an event to select the clicked row, however the script does not have access to the currentRow function. In the image you can see "Gimson Mona" is the selected row even though "Peter Rubina" is the row I've just clicked.