Check for href attribute on currentTarget

This makes clicking on images wrapped in anchor tags open correctly.