Hi, I tried to use for the first time Ajax.InPlaceCollectionEditor, and got few issues that I would like to share with you, just in case it can save you some time.
* First, I am using scriptaculous 1.8.2. I found out that in this version, the InPlaceCollectionEditor was broken (raising a JS error in IE because the editor's element was not extended). I found a fix here : https://prototype.lighthouseapp.com/projects/8887/tickets/163-ajaxinplacecollectioneditor-seems-to-be-broken-in-182 (last post of the page). However, I am not sure the first added line (Element.extend(fld);) is needed since the InPlaceEditor was not raising any error on IE (but it doesn't seems to hurt). * Then, I found out that the submitOnBlur option was not supported, and that ESC and Return keys didn't act as expected (i.e cancel or confirm the edition). Here is my fix for that (including the fix from previous link): 555a556 > Element.extend(fld); 765a767,770 > if (this.options.submitOnBlur) > list.onblur = this._boundSubmitHandler; > Element.extend(list); > list.observe('keydown',this.checkForEscapeOrReturn.bind(this)); also on http://pastie.org/643890. Since it is not really readable, I pasted the full createEditField method here : http://pastie.org/643897 (the 4 lines I've modified begins by /*EA*/). However, if it works great on FF2-3 and IE7-8, for some reasons IE6 is sending a blur event to the select control when it inserts it in DOM, so the list appears and disappears in an eye blink... I think I can workaround the issue by using IE's conditional comments, but if somebody can think to a way to make it work on IE6, it would be great. * Last issue, which is not technically a bug but a very unexpected behavior: I had some options in my collection's parameter which were two characters long. Since the InPlaceCollectionEditor considered them as a two element's array, he thought I was trying to provide an alternative value for my list choices. For example, if you use ['AB','CD'], your list will list 'B' and 'D' (and will post respectively 'A' and 'C' if you select them). Simple workaround is to explicitly specify the value of the option, like this: [['AB','AB'],['CD','CD']] Thanks for any hint about the IE6 issue! Eric NB: Sorry if I don't reply straight away to your replies, but I am trying to read all posts from this list in order, and I am a little behind schedule right now (just read 1st July's ones :o) ) NB2: I first made a search on this group for "InPlaceCollectionEditor" , but it returned only 2 posts (from 1st and 2nd october) while a google search find some more... so don't trust the "Search this group" button... use a google search on "site://groups.google.com/group/prototype- scriptaculous inplacecollectioneditor" if the "Search this group" didn't return what you were looking for :o) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
