mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-17 20:32:17 +02:00
fix focus
This commit is contained in:
@@ -439,13 +439,11 @@ define('composer', [
|
||||
}
|
||||
|
||||
function focusElements(postContainer) {
|
||||
var title = postContainer.find('.title'),
|
||||
bodyEl = postContainer.find('textarea');
|
||||
|
||||
if (title.is(':disabled')) {
|
||||
bodyEl.focus().putCursorAtEnd();
|
||||
} else {
|
||||
var title = postContainer.find('input.title');
|
||||
if (title.length) {
|
||||
title.focus();
|
||||
} else {
|
||||
postContainer.find('textarea').focus().putCursorAtEnd();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user