Fixed BB code editor - Buttons not displying properly in menu bar

Affected version
2.1

MJ0730

Member
Some of the buttons in the menu bar are not showing up. Everything to the right of the media insert (on default settings), so alignment, lists, etc...
New posts correctly display, but when trying to edit a post, it is missing the buttons. I've tried resetting to default with no luck.
195712
 

Mike

XenForo developer
Staff member
Are there any errors in the browser console?

When you mentioned resetting to default, do you mean the editor toolbar icons? I notice a custom one there so I wonder if that's related (though I don't think it necessarily is).
 

MJ0730

Member
Are there any errors in the browser console?

When you mentioned resetting to default, do you mean the editor toolbar icons? I notice a custom one there so I wonder if that's related (though I don't think it necessarily is).
No browser errors.

Correct. I disabled any custom BB code and reset everything to default.

I found the cause however. @Siropu chat addon is causing the behavior.
 

Siropu

Well-known member
Chat uses the editor data-buttons-remove attribute to remove buttons. Isn't that supposed to be editor instance based? Looks like a bug to me.
 

Mike

XenForo developer
Staff member
If you believe there's a bug, please give us a reduced test case so we can reproduce it and go from there.
 

Siropu

Well-known member
In my add-on's case, where the Chat can be displayed on all pages, you basically can end up with two editor instances in threads, conversations, etc. If you remove the buttons on an editor instance (such as the one added by my chat) and you click to edit a post, the buttons removed by the chat editor will get removed from the post editor as well.
 

Chris D

XenForo developer
Staff member
We've had a chance to do some testing now, and I can confirm that when there are multiple editors on a page, then the removebuttons option on one instance can affect another instance unexpectedly.

We'll look into it.
 

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.1).

Change log:
Ensure that each editor instance starts with an empty set of buttons to remove so that removals only affect the desired editor.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top