Hi.

I've been using vt_default to create clean, more simple-looking node-forms but I ran into a problem when I tried to use insert with it. If an insert-enabled field (tried it with imagefield) it seems that FireFox won't let it insert stuff into the body field because the body field is in a div that's set to display:none; (the default tab that is hidden that way when viewing other tabs). However it works fine in Safari (haven't tried it in other browsers yet). Any ideas on how this could be solved?

If this can be solved it would also be nice if tabs were automatically switched (to the one containing the insert-target) when you click insert. That way you wouldn't have to click the tab cotaining the target to see the results.

I don't know how many people are using this method, inserting into fields in vertical tabs but I really like both modules and would love to be able to use them together.

CommentFileSizeAuthor
#7 insert_vertical_tab_active.patch2.99 KBquicksketch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Einkahumor’s picture

I just tested this a little more and found out that this is also a problem with IE 8 but not with Google Chrome (no surprise there since it works in Safari). Iv'e also had reports that this is a problem in FF on Windows (all my tests are on a Mac).

quicksketch’s picture

Hm, this sounds like it would be a problem with any textarea that's placed within a Vertical Tab. Are you using any WYSIWYGs on your site? That may also have an effect. It may very well be that some browsers don't allow you to change the content of textareas that are currently not visible to the user as a privacy/security feature.

Einkahumor’s picture

Yup, I think this would be a problem with all textareas in Vertical Tabs. I'm using the Wysiwyg module and CKEditor but switching to another input format (thus switching off CKEditor) doesn't seem to change anything, FF and IE still won't let me insert anything into a textarea that's in a hidden Vertical Tab. Can you think of a way around this?

Einkahumor’s picture

I should add that I have tried changing display:none to display:block on the tab-pane that contains the insert-target-textarea via firebug and then insert works just fine on FF. I see this as a confirmation that the display:none div around the target is the problem. However, I'm just a themer and I have absolutely no idea if this can be solved or how.

quicksketch’s picture

The best approach I can think of is just activate the tab that contains the textarea before doing the insert. Of course done through JavaScript this would be so fast the user couldn't tell that the tab is activated first and then the content is inserted afterward. Basically I think using your suggestion to activate the tab would effectively solve the problem of inserting into a hidden textarea.

Einkahumor’s picture

Good thinking. I'll see if I can get something working. Any help would be greatly appreciated since I know almost nothing about javascript or php but of course I know you guys are pretty busy. Thanks for the help so far, great module btw.

quicksketch’s picture

Title: Partly broken if used with vt_default » Partly broken if textarea is within a Vertical Tab
Version: 6.x-1.x-dev » 6.x-1.0-beta4
Status: Active » Fixed
FileSize
2.99 KB

This patch should correct the problem by activating the Vertical Tab that contains the editor if it is currently hidden. I've tested it with FCKeditor, tinyMCE, CKeditor, and plain textareas. It seems to work in all of them just fine. I've committed this to both branches and it will be in the next beta.

Einkahumor’s picture

Works for me with CKEditor, this is awesome! Thanks a lot man.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.