소스 검색

fix selector for clipboard sharing option (#6277)

Clipboard sharing uses  <button> instead of <a>, so the selector does not find it
Jacopo Galati 2 년 전
부모
커밋
30f147410d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;