diff --git a/public/language/en_GB/user.json b/public/language/en_GB/user.json index 2de2819dad..d76e82b5b3 100644 --- a/public/language/en_GB/user.json +++ b/public/language/en_GB/user.json @@ -103,6 +103,8 @@ "enable_topic_searching": "Enable In-Topic Searching", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "scroll_to_my_post": "After posting a reply, show the new post", + "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index 8f8bf4ca7d..3eff5a03b5 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -33,10 +33,12 @@ define('forum/topic/posts', [ ajaxify.data.postcount ++; postTools.updatePostCount(ajaxify.data.postcount); - if (config.usePagination) { - onNewPostPagination(data); - } else { - onNewPostInfiniteScroll(data); + if (config.scrollToMyPost) { + if (config.usePagination) { + onNewPostPagination(data); + } else { + onNewPostInfiniteScroll(data); + } } }; diff --git a/src/user/settings.js b/src/user/settings.js index f1c4081b50..fc72342bf9 100644 --- a/src/user/settings.js +++ b/src/user/settings.js @@ -76,6 +76,7 @@ module.exports = function(User) { settings.restrictChat = parseInt(getSetting(settings, 'restrictChat', 0), 10) === 1; settings.topicSearchEnabled = parseInt(getSetting(settings, 'topicSearchEnabled', 0), 10) === 1; settings.bootswatchSkin = settings.bootswatchSkin || 'default'; + settings.scrollToMyPost = parseInt(getSetting(settings, 'scrollToMyPost', 1), 10) ===1; callback(null, settings); }); @@ -120,7 +121,8 @@ module.exports = function(User) { restrictChat: data.restrictChat, topicSearchEnabled: data.topicSearchEnabled, groupTitle: data.groupTitle, - homePageRoute: data.homePageCustom || data.homePageRoute + homePageRoute: data.homePageCustom || data.homePageRoute, + scrollToMyPost: data.scrollToMyPost }; if (data.bootswatchSkin) {