소스 검색

remove nuking of hash changes when hash is disabled

Hakim El Hattab 5 년 전
부모
커밋
ba0b367ed9
3개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 0 0
      dist/reveal.esm.js
  2. 0 0
      dist/reveal.js
  3. 7 3
      js/controllers/location.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/reveal.esm.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/reveal.js


+ 7 - 3
js/controllers/location.js

@@ -131,12 +131,16 @@ export default class Location {
 			else if( config.hash ) {
 				window.history.replaceState( null, null, '#' + this.getHash() );
 			}
+			// UPDATE: The below nuking of all hash changes breaks
+			// anchors on pages where reveal.js is running. Removed
+			// in 4.0. Why was it here in the first place? ¯\_(ツ)_/¯
+			//
 			// If history and hash are both disabled, a hash may still
 			// be added to the URL by clicking on a href with a hash
 			// target. Counter this by always removing the hash.
-			else {
-				window.history.replaceState( null, null, window.location.pathname + window.location.search );
-			}
+			// else {
+			// 	window.history.replaceState( null, null, window.location.pathname + window.location.search );
+			// }
 		}
 
 	}

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.