Not Solved [JavaScript] "Click to edit" is added to empty messages.
#1
Not Solved
Hi, the following text is added to messages with empty content (feature added from a plugin).

You can see the issue in the following test page:
https://ougc.network/entry?other-test-plugin

I tracked the issue to the following line:
https://github.com/mybb/mybb/blob/41fc42...min.js#L38

This isn't present in the default theme.

Does some JavaScript guru knows how to fix this or at least what exactly is causing it? I think it has to do with element identifies (class name, id, etc) and possibly order of elements, but I have no real clue.
Reply
#2
Not Solved
I think this is the correct behaviour of jeditable. When there is no content placeholder is used. You can override default options when .editable() is called: https://github.com/mybb/mybb/blob/aaceba...ad.js#L186
My Projects - Support My Projects

Don't forget to rate posts!
Reply
#3
Not Solved
You are right, adding placeholder: '', around the following line fixes the issue:
https://github.com/mybb/mybb/blob/aaceba...#L188-L196

I think a language string should at least be added for this. Maybe the options should be set within the templates, not just for this but other JS cases around the code, where editing JS is necessary to apply specific changes (add CSS classes to hard coded HTML, for example).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)