Prevent wysiwyg from collapsing when using buttons

From #4939.