Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate text area #2

Open
bernEsp opened this issue May 2, 2011 · 6 comments
Open

duplicate text area #2

bernEsp opened this issue May 2, 2011 · 6 comments

Comments

@bernEsp
Copy link

bernEsp commented May 2, 2011

hello I have a text area with this class "rich_text_editor" in my html with the correct include in header section " <%= include_yui_editor_if_used %>" and I have a link_to_remote in complete event this load an iframe with other html, it has an include in header section and other text area. My problem is that, when I load the text area of iframe the first area is duplicated. if I remove the include in the iframe this work correctly, You know the pluggin, do you have any idea if my problem is relate to you pluggin process?

_sorry for my english_

thank you!

@larsklevan
Copy link
Owner

It seems likely that the javascript that sets up the rich text editor is running twice - maybe before you load the iframe you could also remove the rich_text_editor class from the first text editor?

@bernEsp
Copy link
Author

bernEsp commented May 3, 2011

you right, I've found two includes one in the layout and other in a partial, sorry for this inconvenient :( thank you!

@larsklevan
Copy link
Owner

You're welcome, glad that fixed it!

@bernEsp
Copy link
Author

bernEsp commented May 3, 2011

well I´ve been testing and I could get a conclusion that the problem it's ocurring when you have a html and inside you load other text area via ajax and you need that text area has the rich text editor you need to add other statement inside the partial, so the text area in the main html it has been duplicated, what do you think

@bernEsp bernEsp reopened this May 3, 2011
@bernEsp
Copy link
Author

bernEsp commented May 3, 2011

just for comment, after delete my double calls and testing the behavior and get a conclusion that the you pluggin has some problems just when your page has text areas that are load dinamically via ajax; the fast solucion is delete de rich_text_editor class from all your text areas in the main html and they've created when the page have loaded. I think that the pluggin find again all text areas in the main page and then add other text area with rich text editor then they are duplicate.

@bernEsp
Copy link
Author

bernEsp commented May 3, 2011

I forgot comment that this problem does not happen in firefox, just in chrome, safari and of course ie6,ie7,ie8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants