Letractively / tooltips

Automatically exported from code.google.com/p/tooltips
0 stars 0 forks source link

Code Patch (fixes title= on image tags) #42

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add a title to several input tags.

What is the expected output?
To see a tooltip on each input box when you move the mouse over each input
box containing a title attribute.

What do you see instead?
A tooltip is produced only on the first input tag found, and the browsers
tooltip is shown on all the others.

What version of the product are you using? On what operating system?
Don't know, can't find a version number... i downloaded the .js file with
the last modified date of: March 11, 2009

THE PATCH,

Replace:

// If descendant elements has 'alt' attribute defined, clear it
this.el.descendants().each(function(el){
    if(Element.readAttribute(el, 'alt'))
        el.alt = "";
});

With:

// If descendant elements has 'alt' attribute defined, clear it
Try.these(function () {
    this.el.descendants().each(function(el){
        if(el.readAttribute('alt'))
            el.alt = "";
    });
}.bind(this));

Original issue reported on code.google.com by vantagewebstudios@gmail.com on 20 Oct 2009 at 4:00