Focusing+unfocusing packages field makes the graph darker

Bug #1125220 reported by Matthew Paul Thomas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Errors
Confirmed
Medium
Unassigned

Bug Description

1. Go to <https://errors.ubuntu.com/>.
2. Focus the packages field.
3. Unfocus the field.
4. Repeat steps 2 and 3 as many times as you like.

What happens: Extra copies of the graph are drawn over top of the existing one, making it darker and darker.

What should happen: Nothing, because you haven't changed the value of the field.

Related branches

Revision history for this message
Matthew Paul Thomas (mpt) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

This happens with the new 'users of the package' drop down and text box.

Changed in errors:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Brian Murray (brian-murray) wrote :

This may have fixed the bug:

revno: 360
committer: Evan Dandrea <email address hidden>
branch nick: errors
timestamp: Thu 2013-03-21 01:09:02 +0000
message:
  Do not endlessly redraw the milestone names and dates with each change of the graph state.
modified:
  errors/static/js/mean_time_between_failures.js

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

That might fix the visible part of the bug. The not-so-visible part is that the package field being unfocused triggers a change of graph state at all, which is a waste of time if the field hasn't changed. Probably a script contains an onblur() somewhere when it should be onchange().

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

As it turns out, r360 doesn't fix the bug at all. (Sorry, I should have tested before commenting.)

Revision history for this message
Evan (ev) wrote :

I'm dropping the onblur events, but how should users be made to interact with the package input box?

Should it trigger a reload of the table and graph when the user hits the enter key inside it? Or should we do something more complex, like trigger a reload when a few seconds have elapsed since the last keypress in the box?

Revision history for this message
Evan (ev) wrote :

Blur events dropped in lp:errors r374.

Evan (ev)
Changed in errors:
status: Confirmed → Incomplete
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

As I said, "Probably a script contains an onblur() somewhere when it should be onchange()". <https://developer.mozilla.org/en-US/docs/DOM/element.onchange#Notes> shows that onchange() fires only when the field loses focus *and* its contents have changed, which is what we want.

I like the idea of having the graph and table update when you press Enter too. Spec updated. <https://wiki.ubuntu.com/ErrorTracker?action=diff&rev2=154&rev1=153>

Changed in errors:
status: Incomplete → Confirmed
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.