Update jQuery #1193

Closed
nilshoerrmann opened this Issue Mar 22, 2012 · 9 comments

2 participants

@nilshoerrmann
Symphony CMS member

Yesterday, jQuery 1.7.2 has been released:
http://blog.jquery.com/2012/03/21/jquery-1-7-2-released/

In this context we should revisit the following issues:

  • #1106: JS Cleaning
  • #990: Validation rule for images doesn't work

They might have been related to the following bug that has been fixed with the jQuery release:
http://bugs.jquery.com/ticket/11076

@nilshoerrmann
Symphony CMS member

PS: It seems like the Duplicator script is not using .clone(true) at the moment (maybe because it didn't work?). Adding true and updating to jQuery 1.7.2 should make it possible to revert #990 and #1106.

@nilshoerrmann nilshoerrmann added a commit that referenced this issue Mar 23, 2012
@nilshoerrmann nilshoerrmann Update jQuery and fix Duplicator event handling
- closes #1193
- partly revert fixes from #990 and #1106 that are no longer needed
ac6629c
@nilshoerrmann nilshoerrmann added a commit that closed this issue Mar 23, 2012
@nilshoerrmann nilshoerrmann Update jQuery and fix Duplicator event handling
- closes #1193
- partly revert fixes from #990 and #1106 that are no longer needed
ac6629c
@psychoticmeow
Symphony CMS member

Since switching to .clone(true) it is no longer possible to enter a return in a textarea if it is inside of a duplicator.

@psychoticmeow psychoticmeow reopened this Mar 24, 2012
@nilshoerrmann
Symphony CMS member

Interesting. Are you sure that this is related to the Duplicator and not to another script that attaches event handlers?

@psychoticmeow
Symphony CMS member

While I can't be entirely sure, the issue was easily fixed by removing true.

@nilshoerrmann
Symphony CMS member

Well, that makes sense because in that case no events will be cloned. But we need to clone events to keep tag lists etc. working.

@nilshoerrmann
Symphony CMS member

So I guess something in the core (or in an extension) is doing something on event level to prevent returns.

@psychoticmeow
Symphony CMS member

Yep, the culprit is my Doccy formatter. It adds autocompletion to the textarea. I'll try and find out why this happens, because it doesn't block you from entering returns normaly.

@psychoticmeow
Symphony CMS member

It appears that it looses track of the element that it's attatched to. I think I'll have a shot of fixing this from the formatter itself.

I think the logic should be:

  1. Find all textareas to apply to
  2. Check if they are in a duplicator template
  3. If so, wait for constructor to initialise
  4. If not, initialize now

Wonder if other formatters will need this.

@psychoticmeow
Symphony CMS member

Yep, and here's how it works:

https://github.com/rowan-lewis/doccy_text_formatter/blob/master/assets/publish.js

Closing since it's really not a core issue, but good to keep handy if this happens again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment