jQuery-contextMenu icon indicating copy to clipboard operation
jQuery-contextMenu copied to clipboard

Bug in dataAttr?

Open sophanox opened this issue 5 years ago • 1 comments

I believe this bit of code:

                if(opt.dataAttr){
                    $.each(opt.dataAttr, function (key, item) {
                        opt.$menu.attr('data-' + opt.key, item);
                    });
                }

Should in fact be:

                if(opt.dataAttr){
                    $.each(opt.dataAttr, function (key, item) {
                        opt.$menu.attr('data-' + key, item);
                    });
                }

I.e., it should reference the key in the loop not the (non-existent) key property of opt? This at least makes it work for me

Cheers

sophanox avatar Feb 11 '20 13:02 sophanox

You are right, thanks!

bbrala avatar May 06 '20 18:05 bbrala