per Randal overheard on a foreign network - tab in post/comment edit window goes to submit instead of the next button.

This commit is contained in:
friendica 2015-02-26 17:18:09 -08:00
parent dce0bb0ef8
commit 5d57df2694
3 changed files with 10 additions and 4 deletions

View File

@ -9,6 +9,10 @@
if(obj.value == aStr['comment']) { if(obj.value == aStr['comment']) {
obj.value = ''; obj.value = '';
$("#comment-edit-text-" + id).addClass("comment-edit-text-full").removeClass("comment-edit-text-empty"); $("#comment-edit-text-" + id).addClass("comment-edit-text-full").removeClass("comment-edit-text-empty");
// Choose an arbitrary tab index that's greater than what we're using in jot (3 of them)
// The submit button gets tabindex + 1
$("#comment-edit-text-" + id).attr('tabindex','9');
$("#comment-edit-submit-" + id).attr('tabindex','10');
$("#comment-tools-" + id).show(); $("#comment-tools-" + id).show();
} }
}; };
@ -25,6 +29,8 @@
if(obj.value == '') { if(obj.value == '') {
obj.value = aStr['comment']; obj.value = aStr['comment'];
$("#comment-edit-text-" + id).removeClass("comment-edit-text-full").addClass("comment-edit-text-empty"); $("#comment-edit-text-" + id).removeClass("comment-edit-text-full").addClass("comment-edit-text-empty");
$("#comment-edit-text-" + id).removeAttr('tabindex');
$("#comment-edit-submit-" + id).removeAttr('tabindex');
$("#comment-tools-" + id).hide(); $("#comment-tools-" + id).hide();
} }
}; };

View File

@ -60,7 +60,7 @@
</div> </div>
<div class="btn-group pull-right" id="comment-edit-submit-wrapper-{{$id}}"> <div class="btn-group pull-right" id="comment-edit-submit-wrapper-{{$id}}">
{{if $preview}} {{if $preview}}
<button id="comment-edit-submit-{{$id}}" class="btn btn-default btn-xs" onclick="preview_comment({{$id}}); return false;" title="{{$preview}}"> <button id="comment-edit-presubmit-{{$id}}" class="btn btn-default btn-xs" onclick="preview_comment({{$id}}); return false;" title="{{$preview}}">
<i class="icon-eye-open comment-icon" ></i> <i class="icon-eye-open comment-icon" ></i>
</button> </button>
{{/if}} {{/if}}

View File

@ -21,7 +21,7 @@
</div> </div>
{{/if}} {{/if}}
<div id="jot-title-wrap" class="jothidden" style="display:none"> <div id="jot-title-wrap" class="jothidden" style="display:none">
<input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}"> <input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" tabindex=1 value="{{$title}}">
</div> </div>
{{if $catsenabled}} {{if $catsenabled}}
<div id="jot-category-wrap" class="jothidden" style="display:none"> <div id="jot-category-wrap" class="jothidden" style="display:none">
@ -34,7 +34,7 @@
</div> </div>
{{/if}} {{/if}}
<div id="jot-text-wrap"> <div id="jot-text-wrap">
<textarea class="profile-jot-text" id="profile-jot-text" name="body" placeholder="{{$share}}">{{$content}}</textarea> <textarea class="profile-jot-text" id="profile-jot-text" name="body" tabindex=2 placeholder="{{$share}}">{{$content}}</textarea>
</div> </div>
<div id="profile-jot-submit-wrapper" class="jothidden"> <div id="profile-jot-submit-wrapper" class="jothidden">
<div id="profile-jot-submit-left" class="btn-toolbar pull-left"> <div id="profile-jot-submit-left" class="btn-toolbar pull-left">
@ -99,7 +99,7 @@
<i class="icon-eye-open jot-icons" ></i> <i class="icon-eye-open jot-icons" ></i>
</button> </button>
{{/if}} {{/if}}
<button id="dbtn-submit" class="btn btn-primary btn-sm" type="submit" name="button-submit" >{{$share}}</button> <button id="dbtn-submit" class="btn btn-primary btn-sm" type="submit" tabindex=3 name="button-submit" >{{$share}}</button>
</div> </div>
<div id="profile-jot-perms-end"></div> <div id="profile-jot-perms-end"></div>
<div id="profile-jot-plugin-wrapper"> <div id="profile-jot-plugin-wrapper">