Browse Source

Don't follow links on touch by preventing default

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