Răsfoiți Sursa

fix selector for clipboard sharing option (#6277)

Clipboard sharing uses  <button> instead of <a>, so the selector does not find it
Jacopo Galati 2 ani în urmă
părinte
comite
30f147410d
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      p/scripts/main.js

+ 1 - 1
p/scripts/main.js

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