PANmedia / raptor-editor

Raptor, an HTML5 WYSIWYG content editor!
www.raptor-editor.com
GNU General Public License v3.0
533 stars 136 forks source link

Tooltip may be empty when using locale other than english #181

Open ockam opened 9 years ago

ockam commented 9 years ago

When using the french locale, the tooltip that appears over then pencil icon when hovering an editable allows show an empty tooltip.

Worked around with:

ToolTipPlugin.prototype.init = function() {
    this.raptor.bind('layoutReady', function(node) {
        $(node)
            .on('mouseover', '[title]', function(event) {
                if ($(this).attr('title')) {
                    $(this)
                        .attr('data-title', $(this).attr('title'))
                        .removeAttr('title');
                }
            });
    });
};
deeknow commented 8 years ago

Hey @ockam thanks for posting the attr check above. Could you please consider sending a pull request for this patch to tool-tip.js so we can credit you. Before doing so please also read: https://www.raptor-editor.com/contributing

In the mean time I've committed a related fix to the raptor-locales project for the languages other than French that had an empty string "" value instead of null for the clickButtonToEditTitle string. When these values are null the original tool-tip code removes the blank title attribute you were seeing. See: https://github.com/PANmedia/raptor-locales/commit/7b9626ef127f192f7bcea658ca60de40e4024109