CRM-9290 UI uses JS to do what can be done with CSS

    Details

    • Type: Task
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.3.0
    • Component/s: None
    • Labels:
      None

      Description

      This is small, but irritating...
      In the following places, the UI is using javascript for no good reason:

      • Highlighting a contact and showing links in the "recently viewed" block onHover
      • Highlighting a row in a table onHover
      • Hovering over a crm-accordion-header
      • Hovering a menu item in the admin menu
      • Probably other hover properties, it seems fairly ubiquitous

      In these situations, the css :hover property would be a much better choice.
      The reason I even noticed this is because the JS itself is buggy, and often doesn't "let go" when the mouse stops hovering over the given element.

        Attachments

          Activity

          [CRM-9290] UI uses JS to do what can be done with CSS
          Kurund Jalmi added a comment -

          It would be great if you can work on this changes.

          Coleman Watts added a comment -

          This same error was made in coding the new in-place contact edit forms. Let's make sure to start using css for all hover effects!
          See http://www.w3schools.com/cssref/sel_hover.asp

          Coleman Watts added a comment -

          Have removed lots of js and an entire js file, committed to 4.2

          Coleman Watts added a comment -

          Fixed in inline-edit for 4.3. I think that's got all of them.

            People

            • Assignee:
              Coleman Watts
              Reporter:
              Coleman Watts

              Dates

              • Created:
                Updated:
                Resolved: