diff options
author | zotlabs <mike@macgirvin.com> | 2017-11-06 17:08:48 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-11-06 17:08:48 -0800 |
commit | 11a7a08b9d98073a3dcb012bea4ec32e8baf649d (patch) | |
tree | 1f77e81311470bc81ebb6607e4572c4c35778319 | |
parent | 04d66ba7f499e138baf322cd08f973eb6e3f73c9 (diff) | |
download | volse-hubzilla-11a7a08b9d98073a3dcb012bea4ec32e8baf649d.tar.gz volse-hubzilla-11a7a08b9d98073a3dcb012bea4ec32e8baf649d.tar.bz2 volse-hubzilla-11a7a08b9d98073a3dcb012bea4ec32e8baf649d.zip |
bring back tabindex to submit comments
-rw-r--r-- | view/js/main.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js index 882f50e8a..c3873d823 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -32,7 +32,12 @@ function handle_comment_form(e) { var fields_empty = true; if(form.find('.comment-edit-text').length) { - form.find('.comment-edit-text').addClass('expanded').removeAttr('placeholder'); + var commentElm = form.find('.comment-edit-text').attr('id'); + var submitElm = commentElm.replace(/text/,'submit'); + + $('#' + commentElm).addClass('expanded').removeAttr('placeholder'); + $('#' + commentElm).attr('tabindex','9'); + $('#' + submitElm).attr('tabindex','10'); form.find(':not(:visible)').show(); } @@ -43,7 +48,12 @@ function handle_comment_form(e) { fields_empty = false; }); if(fields_empty) { - form.find('.comment-edit-text').removeClass('expanded').attr('placeholder', aStr.comment); + var emptyCommentElm = form.find('.comment-edit-text').attr('id'); + var emptySubmitElm = commentElm.replace(/text/,'submit'); + + $('#' + emptyCommentElm).removeClass('expanded').attr('placeholder', aStr.comment); + $('#' + emptyCommentElm).removeAttr('tabindex'); + $('#' + emptySubmitElm).removeAttr('tabindex'); form.find(':not(.comment-edit-text)').hide(); } }); |