handle preview click