TWEagle / jquery-watermark

Automatically exported from code.google.com/p/jquery-watermark
1 stars 1 forks source link

Watermark plugin conflicts w/ jQuery UI plugin #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Include the watermark plugin script tag on an existing page. No calls to 
.watermark() included yet.
2. A number of the jQuery UI elements on the page have their formatting messed 
up.

See attached screen shots w/ and w/o the watermark plugin script included on 
the page.

Original issue reported on code.google.com by idevt...@gmail.com on 4 Sep 2010 at 12:31

Attachments:

GoogleCodeExporter commented 9 years ago
Please provide link to demo page showing the issue.  I have used the watermark 
plugin on the same page as jQuery UI without incident, so I can't imagine what 
would cause this kind of problem.  Be sure to strip everything except the 
Watermark plugin and jQuery UI out of the demo page to avoid contaminating the 
page with potential problems from other plugins and/or code.

Original comment by t...@speednet.biz on 6 Sep 2010 at 12:14

GoogleCodeExporter commented 9 years ago
I've also had an issue with a conflict with jquery UI.  Including the 
watermark.js on the page seems to break even the simplest ui drag and drop.  
with an inst is null error on on the greedy line 1817 this code from ui:

this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(functio
n() {
1815 var inst = $.data(this, 'droppable');
1816 if(
1817 inst.options.greedy
1818 && !inst.options.disabled
1819 && inst.options.scope == draggable.options.scope
1820 && inst.accept.call(inst.element[0], (draggable.currentItem || 
draggable.element))
1821 && $.ui.intersect(draggable, $.extend(inst, { offset: 
inst.element.offset() }), inst.options.tolerance)
1822 ) { childrenIntersection = true; return false; }
1823 });
1824

Removing watermark from the scripts tags fixes the problem. Somehow watermark 
appears to be stomping on the droppable data value???

Original comment by dbon...@gmail.com on 11 Sep 2010 at 2:07

GoogleCodeExporter commented 9 years ago
Sorry I should have added:
watermark v3.0.6
jquery v1.4.2
jquery-ui  v1.8.4

Original comment by dbon...@gmail.com on 11 Sep 2010 at 2:09

GoogleCodeExporter commented 9 years ago
Both jquery-ui and watermark define their own :data selector.  including 
watermark in the javascript tags before jquery-ui seems to solve the problem 
yet leave watermark running OK (I haven’t thoroughly tested that).  
Redefining the :data selector in watermark with some other name should also 
solve the issue.

Cheers,
Julian.

Original comment by dbon...@gmail.com on 11 Sep 2010 at 2:23

GoogleCodeExporter commented 9 years ago
Hopefully this will allow Watermark to fix the bug so the plugin can be used.

Chris

Original comment by idevt...@gmail.com on 11 Sep 2010 at 11:42

GoogleCodeExporter commented 9 years ago
Confirmation that this happens as well with jQuery UI 1.8.5 & Watermark 3.0.6.

I've had to pull the watermark script out of my website as it's breaking large 
portions of the jQuery UI

Original comment by alastair...@gmail.com on 4 Oct 2010 at 2:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
It's just practical or reasonable to have to use noConflict() for one plugin
that is not able to resolve compatibility problems. I have 10 other plugins
on the site, none of which have problems. Furthermore, it would entail a
large effort to revise our site just for this one plugin  given the scope of
the site and the testing required after such a broad change.

Original comment by idevt...@gmail.com on 24 Nov 2010 at 11:31

GoogleCodeExporter commented 9 years ago
Version 3.0.8 of the Watermark plugin should fix any conflicts with jQuery UI's 
:data() extension.  I have removed the Watermark plugin's :data() extension and 
replaced it with a duplicate of the jQuery UI extension.  So even if Watermark 
is loaded after jQuery UI, it is only replacing the :data() extension with an 
exact replica.

Anyone who wants a copy of the more sophisticated :data() extension that was 
formerly in the plugin can retrieve a copy of the code from the SVN repository. 
 It is in a new file called "jquery.data.js".

Original comment by t...@speednet.biz on 3 Dec 2010 at 3:53