fix previewLinks target

edit
Hakim El Hattab 2014-09-04 18:00:21 +02:00
parent 80c375fae8
commit 2cd988a7a3
1 changed files with 6 additions and 4 deletions

View File

@ -3778,10 +3778,12 @@
*/ */
function onPreviewLinkClicked( event ) { function onPreviewLinkClicked( event ) {
var url = event.target.getAttribute( 'href' ); if( event.currentTarget && event.currentTarget.hasAttribute( 'href' ) ) {
if( url ) { var url = event.currentTarget.getAttribute( 'href' );
showPreview( url ); if( url ) {
event.preventDefault(); showPreview( url );
event.preventDefault();
}
} }
} }