This project is archived and is in readonly mode.

#1239 ✓wontfix

Tips improvement ideas

Reported by Xandros | June 7th, 2011 @ 06:53 PM

Not really a bug, but it is quite annoying to see empty tips IMHO, it would be nice for the Tips class to not attach to elements with empty text and title.

Also, for a page with a large number of tipped elements or ajax content, there could be some way to handle Tips with event delegation instead of the current way.

Also, an Request-enabled retrieval of text and title would be a must !

Comments and changes to this ticket

  • Xandros

    Xandros June 9th, 2011 @ 02:21 PM

    Attempt of request-enabled retrieval of text, but unfortunately not working properly on jsFiddle because the api won't accept get requests for /echo/

  • Xandros

    Xandros June 9th, 2011 @ 03:31 PM

    Ok updated it to make work in JSFiddle with post/get limitation

  • Arian

    Arian June 11th, 2011 @ 03:28 PM

    • State changed from “new” to “wontfix”
    • Assigned user set to “Arian”
    1. You can pass an instance of Elements as first argument, so maybe you can do the filtering yourself first, or with a little more complex css selector

    2. Usually delegating mouse events isn't really beneficial for performance, because each time the mouse is moved, it will check for the matched elements. And as you might know mousemove fires a lot, so this could harm your perf.

    3. Subclassing Tips is indeed the best way, using the setText and setTitle methods as you did. This isn't really something to include in mootools-more itself, but it would be a great addition to the MooTools Forge.

  • Xandros

    Xandros June 11th, 2011 @ 04:30 PM

    Hello Arian

    1) *[title] would work, but it also selects elements with an empty title attribute, which is clearly not desired. is there a selector to restrict to elements having a title argument AND it being a non-empty string ?

    1. This could apparently work with delegating mouseenter and mouseleave, not mousemove obviously !

    2. ok !

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket