choicedit assumes icons are inline and tampers with the style.display

Bug #1064555 reported by Curtis Hovey
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

I see lib/lp/app/javascript/choiceedit/choiceedit.js is setting style when we want to toggle class:
    this.get('editicon').setStyle('display', 'inline');
I would have thought I would be seeing this broken in many places. This is the only case of icons and inline that I see in the code, but there are several cases where none, inline, and block are used and assume the thing is one of those types. Maybe we want to forbid calling
    .setStyle('display', 'XXX');
and instead require toggleClass('hidden')

Curtis Hovey (sinzui)
tags: added: css tech-debt
removed: disclosure information-type private-projects
Changed in launchpad:
importance: High → Low
Revision history for this message
Richard Harding (rharding) wrote :

This was due to manual intervention of setting the style corrected in the process of fixing bug #1052551

Changed in launchpad:
status: Triaged → Invalid
Revision history for this message
Curtis Hovey (sinzui) wrote :

This is bad code is still present, the bug can be closed when the offending code is removed.

Changed in launchpad:
status: Invalid → Triaged
description: updated
Revision history for this message
Curtis Hovey (sinzui) wrote :

See bug 1067382 which notes that the img src is lost during the transitions. It may be caused by the same bad code that this bug is about.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.