jordandelozier / wysibb

WYSIWYG BBcode editor
http://www.wysibb.com
246 stars 86 forks source link

scrolling bug #84

Open outtony opened 10 years ago

outtony commented 10 years ago

when you have more than one on page and one is on top and the second on down, when clicked to empty space, page will scroll away.

how to reproduce: 1, use example code (bellow) 2, click to first or last textarea 3, click on empty space (where is something else written)

example code:

<!-- Load jQuery --> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

<!-- Load WysiBB JS and Theme --> <script src="http://cdn.wysibb.com/js/jquery.wysibb.min.js&quot;&gt;&lt;/script&gt; <link rel="stylesheet" href="http://cdn.wysibb.com/css/default/wbbtheme.css&quot; />

<br><br><br><br><br><br><br><br><br><br><br><br>something else<br><br><br><br><br><br><br><br><br><br><br><br> <!-- Init WysiBB BBCode editor --> <script> $(function() { $(".editor").wysibb(); }) </script>

<body> <textarea name='text1' class="editor"></textarea> </body>

<br><br><br><br><br><br><br><br><br><br><br><br>something else<br><br><br><br><br><br><br><br><br><br><br><br> <body> <textarea name='text2' class="editor"></textarea> </body>

<br><br><br><br><br><br><br><br><br><br><br><br>something else<br><br><br><br><br><br><br><br><br><br><br><br> <body> <textarea name='text3' class="editor"></textarea> </body>

<br><br><br><br><br><br><br><br><br><br><br><br>something else<br><br><br><br><br><br><br><br><br><br><br><br> <body> <textarea name='text4' class="editor"></textarea> </body>

<br><br><br><br><br><br><br><br><br><br><br><br>something else<br><br><br><br><br><br><br><br><br><br><br><br>

Jadro007 commented 9 years ago

I have same problem

Jadro007 commented 9 years ago

I found little workaround, not sure if it brakes anything else, but work for me. Comment line 1824 (in function setBodyFocus this.$body.focus();)