Closed
Bug 1301051
Opened 8 years ago
Closed 8 years ago
number fields sometimes steal scroll events, causing unwanted changes to their values
Categories
(Release Engineering Graveyard :: Applications: Balrog (frontend), defect, P3)
Release Engineering Graveyard
Applications: Balrog (frontend)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Callek, Assigned: tpingili, Mentored)
References
Details
(Whiteboard: [lang=js][good first bug][ready])
When I have rate and priority fields selected, I find that scrolling the page becomes dire.
I've made mistakes in the past with clicking on update after scrolling and realizing after-the-fact that the rate or priority setting I meant to specify, isn't what got specified.
This can have negative affects such as accidentally making a rule affect people it wasn't intended for (with priority setting). Or making a release 'live' wider earlier than it should (with rate setting).
Comment 1•8 years ago
|
||
I clarified with Callek on IRC. The problem he's hitting is that if Background Rate or Priority ends up under the cursor while scrolling, that field changes rather than continuing to scroll.
I think the best thing to do here is just change these fields to text rather than number. Background rate changes are usually very large jumps, so I doubt anyone uses the up/down controls to adjust that. Priority changes are sometimes much smaller, but it shouldn't be a big deal to do those by hand.
Mentor: bhearsum
Summary: Integer Fields while updating a rule, accidentally modify while trying to scroll. → number fields sometimes steal scroll events, causing unwanted changes to their values
Whiteboard: [lang=js][good first bug]
Reporter | ||
Comment 2•8 years ago
|
||
first answer is a also useable magic: http://stackoverflow.com/questions/9712295/disable-scrolling-on-input-type-number
But admittedly type=text should be completely safe, I just personally like the idea of semantics with type=number, and for some potential (not yet planned) future where we support mobile browsers/aspect-ratios for balrog.
Comment 3•8 years ago
|
||
Hi, I'm interested in helping for this bug. Can you please specify the steps to follow as I am new to this? Thanks!
Comment 4•8 years ago
|
||
(In reply to Sivaranjani Subramanian from comment #3)
> Hi, I'm interested in helping for this bug. Can you please specify the steps
> to follow as I am new to this? Thanks!
Hi, sorry for the delayed response. The best thing to do to get started is to make sure you can run the development environment with the instructions here: https://github.com/mozilla/balrog/blob/master/README.rst
Once you're able to load http://localhost:8080, try to reproduce this bug by going to http://localhost:8080/rules, clicking "Update" on a Rule, and scrolling with your mouse while the cursor is over the "Priority" or "Background Rate" field.
When you're able to reproduce, it's time to look for a fix! I'm not exactly sure what the fix here is, but it would most likely be in the template (https://github.com/mozilla/balrog/blob/master/ui/app/templates/rule_modal.html) or controllers (https://github.com/mozilla/balrog/blob/master/ui/app/js/controllers/rule_edit_controller.js and https://github.com/mozilla/balrog/blob/master/ui/app/js/controllers/rule_new_controller.js).
If you have any trouble feel free to ask here, or join us in irc://irc.mozilla.org/#balrog.
Updated•8 years ago
|
Priority: -- → P3
Whiteboard: [lang=js][good first bug] → [lang=js][good first bug][ready]
Assignee | ||
Comment 5•8 years ago
|
||
Hi Ben,
I made a PR changing the type to 'text' for both the input fields.
Comment 6•8 years ago
|
||
Commit pushed to master at https://github.com/mozilla/balrog
https://github.com/mozilla/balrog/commit/e98785761c60ff5a7f3cd58a639cdf1b702a80f4
Bug 1301051:number fields sometimes steal scroll events, causing unwanted changes to their values (#260). r=bhearsum,ninadbhat
Updated•8 years ago
|
Assignee: nobody → tpingili
Comment 7•8 years ago
|
||
In production, thank you very much Teja!
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Product: Release Engineering → Release Engineering Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•