Skip to content

Commit 3bb2868

Browse files
committed
Don't follow links on touch by preventing default
1 parent 0b8783e commit 3bb2868

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/editor.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,12 @@
851851
}
852852
}
853853

854+
function preventLinkFollowingOnTouch() {
855+
$('#zss_editor_content').delegate('a', 'touchend', function(event) {
856+
event.preventDefault();
857+
});
858+
}
859+
854860
zss_editor.init = function() {
855861

856862
disableLineBreakIfNecessary('zss_editor_title');
@@ -880,6 +886,8 @@
880886
setupTouchEndFocus('zss_editor_title');
881887
setupTouchEndFocus('zss_editor_content');
882888

889+
preventLinkFollowingOnTouch();
890+
883891
whenPastingInsertAsPlainText('zss_editor_title');
884892
whenPastingInsertAsPlainText('zss_editor_content');
885893

0 commit comments

Comments
 (0)