From d57f4a9527896b472f5bf6dc429a1edeff0d0aef Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 8 Mar 2021 19:12:37 +0000 Subject: fix unexpected trigger of buttons when pressing enter in input field issue #1528 --- view/tpl/jot-header.tpl | 12 ++++++------ view/tpl/jot.tpl | 44 ++++++++++++++++++++++---------------------- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'view') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 2539c1fdf..dde623783 100644 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -51,7 +51,7 @@ var activeCommentID = 0; var activeCommentText = ''; $(document).ready(function() { - + $("#profile-jot-text").focus(enableOnUser); $("#profile-jot-text").click(enableOnUser); @@ -125,8 +125,8 @@ var activeCommentText = ''; }); - function jotSetMime() { - var mtype = $('#id_mimetype').val(); + function jotSetMime() { + var mtype = $('#id_mimetype').val(); if(mtype == 'text/bbcode') $('#profile-jot-submit-left').show(); else @@ -155,7 +155,7 @@ var activeCommentText = ''; textarea = document.getElementById('profile-jot-text'); if (textarea.selectionStart || textarea.selectionStart == "0") { var start = textarea.selectionStart; - var end = textarea.selectionEnd; + var end = textarea.selectionEnd; if (end > start) { reply = prompt("{{$linkurl}}"); if(reply && reply.length) { @@ -351,7 +351,7 @@ var activeCommentText = ''; return false; }); }); - + } function itemFilerRm(id, term) { @@ -593,7 +593,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del localStorage.removeItem("post_body" + postid); localStorage.removeItem("post_category" + postid); } - } + } } diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 1454f038b..53d4f094d 100644 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -52,15 +52,15 @@
{{if $is_owner}} - + {{/if}} {{if $reset}} - {{/if}}
- +
{{if $attachment}}
@@ -99,19 +99,19 @@
{{if $bbcode}}
- - - - -
@@ -119,29 +119,29 @@ {{if $visitor}}
{{if $writefiles}} - {{/if}} {{if $weblink}} - {{/if}} {{if $embedPhotos}} - {{/if}}
{{if $setloc}} - {{/if}} {{if $clearloc}} - {{/if}} @@ -149,17 +149,17 @@
{{/if}} {{if $feature_expire}} - {{/if}} {{if $feature_future}} - {{/if}} {{if $feature_encrypt}} - {{/if}} @@ -167,7 +167,7 @@ {{if $feature_nocomment}} - {{/if}} @@ -224,26 +224,26 @@
{{foreach $customsubmitright as $csr}} - {{/foreach}} {{if $preview}} - {{/if}} {{if $jotnets}} - {{/if}} {{if $showacl}} - {{/if}} - +
{{if $jotplugins}} -- cgit v1.2.3