[ 6 posts ]

Ryan

  • Username: gomi99
  • Joined: Sun Nov 06, 2011 5:47 am
  • Posts: 15
  • Offline
  • Profile

Editor within Tab problem

Post Posted: Sat Apr 07, 2012 6:59 am
+0-
I have 2 editors within a single tab that is inside a tabview with multiple tabs.

When the tab containing the 2 editors is initially rendered there is no problem. But when I switch tabs and then return to the tab containing the 2 editors the second editor does not appear.

This problem only occurs in Firefox it seems. After some investigation I found that the second editor's iframe body tag 'id' attribute disappears. This may be why the second editor does not appear properly.

Is there any way to fix this problem?

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 620
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile

Re: Editor within Tab problem

Post Posted: Mon Apr 09, 2012 6:58 am
+0-
I've run into problems rendering some widgets on hidden nodes in some browsers as well. It's usually a good idea to wait until the node is shown to render the widget. For example, in a tabview you can do:
Code:
tab.on('selectedChange', function (e) {
  if (e.newVal && !editor.get('rendered')) {
    editor.render();
  }
});

I hope that helps.

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile

Re: Editor within Tab problem

Post Posted: Mon Apr 09, 2012 7:07 am
+0-
@Juan

This is the proper technique for showing an Editor. Rendering the dynamic, editable iframe into a hidden element freaks it out pretty good :)

Ryan

  • Username: gomi99
  • Joined: Sun Nov 06, 2011 5:47 am
  • Posts: 15
  • Offline
  • Profile
Tags:

Re: Editor within Tab problem

Post Posted: Sun Apr 15, 2012 7:54 am
+0-
Thanks for the advice.

I tried what you said but I still run into the same problem in Firefox.

I created an example here.

http://jsfiddle.net/myG6f/4/

Ryan

  • Username: gomi99
  • Joined: Sun Nov 06, 2011 5:47 am
  • Posts: 15
  • Offline
  • Profile

Re: Editor within Tab problem

Post Posted: Sun Apr 22, 2012 6:01 pm
+0-
This problem seems to be resolved in Firefox 12.0

Thank you

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 620
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile

Re: Editor within Tab problem

Post Posted: Mon Apr 23, 2012 5:04 am
+0-
It works OK for me on Firefox 11 as well.
  [ 6 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum