MyBB Community Forums

Full Version: BB-code AND JavaScript Issues.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
when js bb-codes are used, like for making a marked text in bold, or importing a picture [Image: image.gif] , the whole posting-box is to be rolled to the beginning and it's quite annoying, especially when posting big, long threads, full of
bb-codes.

Can and may something be done to prevent this?
Which browser (and version) are you using? Have you updated to MyBB 1.1.1?

Fx and IE and Opera all handle cursor position slightly different within a text area.
Thanks for your reply

laie_techie Wrote:Which browser (and version) are you using? Have you updated to MyBB 1.1.1?

the above occurs,

while using all version of mybb (including the last, 1.1.1)

and while using both ie(6) and ff(1.0.2) .


laie_techie Wrote:Fx and IE and Opera all handle cursor position slightly different within a text area.

dude, i think you got that one wrong.

I'm not referring the cursor position.

I mean the rollback to top after using the js-bb-code-buttons.
oh, you mean the scroll for the whole page, not just the cursor in the text area.

in that case, each of the onclick, onchange, etc functions need to return false (meaning don't go to the href - which probably is set to "#"). You can edit them in the codebuttons template.

For example, change:
<select name="font" onchange="insertCode('font', this.options[this.selectedIndex].value)">
to:
<select name="font" onchange="insertCode('font', this.options[this.selectedIndex].value); return false;">
appreciate it,

but it will be real coo if it's added / rewritten in next vers.