Hello there!
I´ve got beauty tips working inside several node forms, with all help text inside each beauty tip.
The thing is that some of that information contains links, but user cannot link on them.
I mean, if the user wants to click inside each link the BT bubble dissapers very fast without the user to be able to actually click the link.
Is this a bug, or a misconfiguration?
Thanks!
Rosamunda

Comments

kleinmp’s picture

Category: bug » support

Whether this is a bug or not depends on how you've setup beautytips. Is this using the built in text input tips or custom tips?

If you're using a custom beauytip, then this information may be helpful.
If the tips are set to show up on hover, then they'll disappear when a user is not hovering over the trigger item. Alternatively, you can set it up to only disappear on a mouse click. Or, you can also use hover intent, which allows the beautytip to have a timed turnoff.

Rosamunda’s picture

Hi there!
I´m using the default stuff. That´s why I set this as a bug. (But maybe that´s the normal behaviour??)
I haven´t managed to get my customized stuff into a beauty tip yet (that will be a matter of other issue ;)
Is the default help text input that you can add when creating/editing a cck field.
Thanks for your tips, your help and mostly... your patience with this n00b!
Rosamunda

Rosamunda’s picture

Category: support » bug

I´ve tried this in more than one browser (firefox and chrome) and in another D6 install with default information, and the problem remains.
The tip appears only when I click on the desired cck field, inside the edit form. And it still won´t let me click on its links.
I´m using advanced help inject, biut I don´t think that could be the problem.

I´m setting this as a bug again... I really hope it´s not.

Rosamunda

kleinmp’s picture

Title: BT bubble dissapears without the user to be able to click on the links that the bubble has » Allow users to click on links within default text input beautytips
Version: 6.x-1.1 » 6.x-2.x-dev
Component: User interface » Code
Category: bug » feature

I had never really tried doing that, but you're right it doesn't work. The 'blur' event, which turns the beautytips off, runs before the mouse click is registered, so you end up clicking on whatever was behind the tip.

I'm going to move this to a feature request. It's probably a matter of playing around with the different possible triggers for turning the tips on and off. If that doesn't fix it, then it would need to be fixed in the beautytips plugin itself.

For now, I suggest just copying the code that creates the text input beautytip and play around with the possible triggers to see if you can find a combination that meets your needs. It's really a matter of how you decide the beautytips should be turned off. If you find something that works for you, then let me know.

[edit]
Actually, just tested this out and found that it works well for link clicking if you set the off trigger to 'dblclick', plus it seems to turn off on blur anyway. Anyway, that may work for you.

infiniteluke’s picture

Hi kleinmp -
When you were testing this out, do you remember where/how you set the trigger to dblclick?

kleinmp’s picture

I copied the code form the textinput.inc that adds the options to the node form. Then I changed the trigger to use dblclick instead of blur.

...
$options['bt_text_field'] = array(
  'cssSelect' => 'input.form-text',
  'trigger' => array('focus', 'dblclick'),
  'contentSelector' => "$(this).nextAll('.description:eq(0)').hide().html()",
  'width' => '275px',
  'positions' => array(0 => variable_get('beautytips_position', 'bottom')),
  'preEval' => TRUE,
);
...
infiniteluke’s picture

Thanks for the quick response - I ended up finding that chunk of code and changing the trigger worked, but I'd rather not patch the module. Is there a way I can edit these settings from a form alter?

infiniteluke’s picture

I'm thinking about making the show and hide events configurable on the settings page. For example, under the Text Input Tooltips fieldset I will add 2 pairs of select lists - one for text field and one for text area. Each pair will have 2 drop downs. One drop down would be for the "show" event and one for the "hide" event, both with some help text. Both select fields would contain a list of jQuery events relevant to text input fields.

Would you consider accepting this patch if I work on it? I may have time for it tonight.

infiniteluke’s picture

Status: Active » Needs review
StatusFileSize
new8.19 KB

As mentioned above, this patch adds two sets of fields to give show/hide events for text fields and areas. I chose focus, blur, and dblclick as the possible events. Though not all of the events make sense together - for example, blur for show combined with focus for hide :) - none of the combinations are harmful and the defaults (same as before) work great. Let me know if there are any tweaks and I can re-patch.

adshill’s picture

It appears you have removed all of the t() code which is vital for international multi language sites. I'll try to patch manually without these changes and test to let you know.

infiniteluke’s picture

Strange - I'm surprised I didn't notice that. Thanks for the heads up. Let me know if it works and I can re-patch with t() included.

infiniteluke’s picture

Added t() calls back.

pifagor’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)