https://bugzilla.wikimedia.org/show_bug.cgi?id=57146

--- Comment #6 from kipod <fur.hew...@gmail.com> ---
(In reply to comment #4)
> Can you please submit patches to our git (gerrit) development ecocycle?

unfortunately no - i did not go through all the steps required to install the
"ecocycle" as you call it - i got stuck at some step (can't remember exactly
where) and abandoned it. i might go back to it one day, but i doubt it will be
soon.

(In reply to comment #5)
> I think the behaviour you're seeing is expected: see the "Slightly Advanced
> Usage" section of [1]. The "title" property is meant to hold the name of the
> attribute whose value is used for the tooltip. If you want to use a custom
> string, use the "fallback" property, like Twinkle does [2].
> 
> [1] http://onehackoranother.com/projects/jquery/tipsy/
> [2] https://github.com/azatoth/twinkle/blob/master/morebits.js#L592

the behavior might be "by design" that does not automatically preclude it from
being a bug (designs can also contain bugs).

it is convoluted and does not make any sense. for the very rare case where you
want to take the hint from some other attribute of the element (i can't think
of a single case where such bizarre feature makes sense), one can always set

title: function(){return $(this).attr('foo'); }

(btw - it would make more sense to use "data" or "prop" than "attr" - strictly
speaking only valid html attributes should be used with "attr")

otoh, the much more standard case is to feed the text when creating the tip.
the current code uses an extra, completely superfluous field of "options" named
"fallback" for that. 

making a very common case more difficult (or at least convoluted), in favor of
some corner case which is not interesting (and can be easily implemented in the
rare case someone will actually want it) is a bug, IMO.

however, i can concede that this behavior, though illogical,  should be
preserved for backward compatibility.

i can not concede that removing the the extra variable declarations shouldn't
be cleaned:

             var title, $e = this.$element, o = this.options;
             fixTitle($e);
             var title, o = this.options;

clearly, declaring "title" and "o" twice is just a sloppy bug - the line was
copied and moved, but the original line was not removed.

peace.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to