Explorar o código

fix selector for clipboard sharing option (#6277)

Clipboard sharing uses  <button> instead of <a>, so the selector does not find it
Jacopo Galati %!s(int64=2) %!d(string=hai) anos
pai
achega
30f147410d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      p/scripts/main.js

+ 1 - 1
p/scripts/main.js

@@ -697,7 +697,7 @@ function auto_share(key) {
 	if (!share) {
 		return;
 	}
-	const shares = share.parentElement.querySelectorAll('.dropdown-menu .item a');
+	const shares = share.parentElement.querySelectorAll('.dropdown-menu .item [data-type]');
 	if (typeof key === 'undefined') {
 		// Display the share div
 		location.hash = share.id;