Fixed profile editing
authorAlexander Ebert <ebert@woltlab.com>
Thu, 21 Jul 2016 08:18:16 +0000 (10:18 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 21 Jul 2016 10:55:02 +0000 (12:55 +0200)
wcfsetup/install/files/js/WCF.User.js

index 7dc244e6ddedb6f74bbadef518a95f07ef80872e..e97f484cacaacc9cfbc3c130135b922ad0e21ee0 100644 (file)
@@ -966,10 +966,10 @@ WCF.User.Profile.Editor = Class.extend({
        /**
         * Begins editing.
         * 
-        * @param       {Event}         event   event object
+        * @param       {Event?}         event   event object
         */
        _beginEdit: function(event) {
-               event.preventDefault();
+               if (event) event.preventDefault();
                
                this._actionName = 'beginEdit';
                this._buttons.beginEdit.parent().addClass('active');
@@ -1008,7 +1008,7 @@ WCF.User.Profile.Editor = Class.extend({
                                
                                case 'textarea':
                                        if ($element.data('redactor')) {
-                                               $value = $element.redactor('wutil.getText');
+                                               $value = $element.redactor('code.get');
                                        }
                                break;
                        }