jeffreyhi1 / jscrollpane

Automatically exported from code.google.com/p/jscrollpane
0 stars 0 forks source link

Calling the tinymce() plugin messes up future jScrollPane calls #167

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call the tinyMCE editor on any element (with the jQuery plugin)
2. Call jScrollPane on any element

What is the expected output? What do you see instead?
The scrollbar *should* render correctly. Instead, the bottom scroll arrow
('.jScrollArrowDown') and the bottom of the drag bar
('.jScrollPaneDragBottom') are no longer rendered even in the DOM

What version of the jScrollPane are you using? On what browser? And
operating system?
jScrollPane 1.2.3.  Browser and OS have not mattered.

Please provide a URL to a page displaying the problem.

Please provide any additional information below.
The problem was fixed when I changed the way elements get appended.  The
jScrollPane plugin uses a multiple argument append call (Line 148 &
184-~212).  For some reason, after tinymce() is called (through the
jQuery), the append method only takes the first argument.  This makes it so
only the top parts are appended, and the bottom parts are no longer
appended.  This is fixed by calling '$().append(elem1).append(elem2)
'instead of calling '$().append(elem1, elem2)'.  Changing this has resolved
the issues I was having with no ill-effects.

Original issue reported on code.google.com by nicholas...@gmail.com on 27 Jan 2010 at 7:53

GoogleCodeExporter commented 9 years ago
Thanks for the bug report. I'm hesitant to make the change you suggest because 
it
sounds like a bug with TinyMCE rather than jScrollPane or jQuery. If TinyMCE has
somehow changed the signature of jQuery.append then this has the potential to 
break
much more than just jScrollPane.

I would suggest bringing this to the attention of the TinyMCE dev team so that 
they
can change their code so it doesn't break existing jQuery functionality.

Original comment by kelvin.l...@gmail.com on 29 Jan 2010 at 9:00

GoogleCodeExporter commented 9 years ago
I cannot find documentation supporting multiple arguments for the append 
method. 
Chaining has no ill-effects (except it might be slightly slower).  tinyMCE 
would seem
to be the culprit since jScrollPane works as expected until tinyMCE was added 
to the
project.  Either way, the fix was needed for the particular project and I 
thought if
someone else ran into the issue, I found a quick and easy solution.

Original comment by nicholas...@gmail.com on 30 Jan 2010 at 5:07