소스 검색

Merge branch 'patch-1' of https://github.com/jhofker/reveal.js into dev

Hakim El Hattab 10 년 전
부모
커밋
fc568b5524
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      js/reveal.js

+ 4 - 1
js/reveal.js

@@ -4054,7 +4054,10 @@
 		// If, after clicking a link or similar and we're coming back,
 		// focus the document.body to ensure we can use keyboard shortcuts
 		if( isHidden === false && document.activeElement !== document.body ) {
-			document.activeElement.blur();
+			// Not all elements support .blur() - SVGs among them.
+			if (typeof document.activeElement.blur === 'function') {
+				document.activeElement.blur();
+			}
 			document.body.focus();
 		}