Przeglądaj źródła

Allow users to use meta keys when navigating to preview links

tobi-or-not-tobi 1 miesiąc temu
rodzic
commit
9f7256fe78

Plik diff jest za duży
+ 0 - 0
dist/reveal.esm.js


Plik diff jest za duży
+ 0 - 0
dist/reveal.esm.js.map


Plik diff jest za duży
+ 0 - 0
dist/reveal.js


Plik diff jest za duży
+ 0 - 0
dist/reveal.js.map


+ 4 - 0
js/controllers/overlay.js

@@ -284,6 +284,10 @@ export default class Overlay {
 
 		// Was a link preview clicked?
 		if( linkTarget ) {
+			if (event.metaKey || event.shiftKey || event.altKey) {
+				// Let the browser handle meta keys naturally so users can cmd+click, cmd+shift+click, shift+click, alt+click, etc.
+				return;
+			  }
 			let url = linkTarget.getAttribute( 'href' ) || linkTarget.getAttribute( 'data-preview-link' );
 			if( url ) {
 				this.showIframePreview( url );

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików