When i challenge a friend (don't know if it happens with random people) i get stuck in this window, unable to do anything related to the fight. I can close it and surrender as well as messaging my enemy.
Try disabling pokemon cries and/or battle music. One of those two must be causing the problem. Try first with pokemon cries disabled and battle music on, if it still happens then simply play without music.