From: Alexander Ebert Date: Fri, 17 Oct 2014 00:12:55 +0000 (+0200) Subject: Added support for clicking into the void after a quote X-Git-Tag: 2.1.0_Alpha_1~219^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=792fe6458b8612aa84994924736e3494396abbee;p=GitHub%2FWoltLab%2FWCF.git Added support for clicking into the void after a quote --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 22fb89dd91..8694994bd1 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -90,6 +90,15 @@ RedactorPlugins.wbbcode = function() { this.button.get('html').children('i').removeClass('fa-square').addClass('fa-square-o'); } }).bind(this); + + // insert a new line if user clicked into the editor and the last children is a quote (same behavior as arrow down) + this.wutil.setOption('clickCallback', (function(event) { + if (event.target === this.$editor[0]) { + if (this.$editor[0].lastElementChild && this.$editor[0].lastElementChild.tagName === 'BLOCKQUOTE') { + this.wutil.setCaretAfter($(this.$editor[0].lastElementChild)); + } + } + }).bind(this)); }, /**