bpo-34120: fix text viewer to call grab_release() only when needed (GH-8616)

(cherry picked from commit dd74369cb7b230b07ac3a031563406c8f2aae17f)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
1 file changed