Browse Source

Don't follow links on touch by preventing default

Yevhen Pavliuk 7 years ago
parent
commit
3bb286890b
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      src/editor.html

+ 8
- 0
src/editor.html View File

@@ -851,6 +851,12 @@
851 851
 				}
852 852
 			}
853 853
 
854
+			function preventLinkFollowingOnTouch() {
855
+				$('#zss_editor_content').delegate('a', 'touchend', function(event) {
856
+					event.preventDefault();
857
+				});
858
+			}
859
+
854 860
 			zss_editor.init = function() {
855 861
 
856 862
 				disableLineBreakIfNecessary('zss_editor_title');
@@ -880,6 +886,8 @@
880 886
 				setupTouchEndFocus('zss_editor_title');
881 887
 				setupTouchEndFocus('zss_editor_content');
882 888
 
889
+				preventLinkFollowingOnTouch();
890
+
883 891
 				whenPastingInsertAsPlainText('zss_editor_title');
884 892
 				whenPastingInsertAsPlainText('zss_editor_content');
885 893