New issue
Advanced search Search tips

Issue 598818 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 598805
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

In DevTools "device mode", cannot resize width in 1px increments

Reported by broc.s...@gmail.com, Mar 29 2016

Issue description

Chrome Version       : 49.0.2623.108
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)

What steps will reproduce the problem?
1. Open dev tools
2. Toggle Device Mode "on" (Ctrl + Shift + M)
3. Select "Responsive" from device list at top of screen
4. Drag the resize bar to change the width

What is the expected result?

You should be able to change the width by 1px by dragging the width resize bar.

What happens instead of that?

You can only change width 2px at a time by dragging. This is because the subject  page is centered, and moving the resize bar is changing the left *and* right bounds *both* by one, meaning the net change is always +/- 2px.


Please provide any additional information below. Attach a screenshot if
possible.

This is one of a series of issues related to the fact that the device mode centers the page. More details here: https://gist.github.com/bseib/be0718842f4c7b31074300f7368e3694  and here : https://bugs.chromium.org/p/chromium/issues/detail?id=598805



UserAgentString: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.108 Safari/537.36



 
once-odd-always-odd.png
457 KB View Download
Cc: dgozman@chromium.org pfeldman@chromium.org
Components: Platform>DevTools
Status: Untriaged (was: Unconfirmed)
@broc.seib -- Thank You for the report.

Could some one from Dev team please confirm whether this is an issue or working as intended.
Adding Dev Team related Devs in Cc who might provide a suggestion.
Thanks in Advance.
Labels: Needs-Feedback
Hmm, I just tried on Chrome 49 and was able to resize width in 1px increment. Could it be that your mouse is overly sensitive? In this case, holding "shift" while dragging resize borders will help to do precise adjustments.

Please, let me know if it works for you.
Owner: dgozman@chromium.org
Status: Assigned (was: Untriaged)
I guess this is about new version (50 or 51).
I did a little investigating on the mouse -- it's fine. I captured the USB packets and found a delta of +1 on the mouse x axis would indeed make the width increase by 2px. (I have capture file and screen capture...)

From a coding point of view, the net 2px change is necessary while the subject is centered -- some function receives an event that says x changed by 1px, and now the right hand wall must be moved by 1px. And because the subject is centered, the left hand wall must also move by 1px. This is strictly because the mouse and the resizer bar move together 1:1.

If I use the shift-key modifier (I didn't know about that -- cool!), then I can successfully move the resizer bar in 1px increments. This avoids the 1:1 constraint of the above problem.

The nature of this report was that the 2px width change was a bad side effect of the UI choice of centering the subject -- an argument against centering. The shift-key modifier solution makes perfect sense for having a centered subject. An option to left-align the subject would be acceptable too.

This issue shold be closed since you can actually change the width by 1px, and those broader concerns about centering can be taken up in  issue 598805 .
https://bugs.chromium.org/p/chromium/issues/detail?id=598805
Mergedinto: 598805
Status: Duplicate (was: Assigned)
Thank you for detailed investigation. Indeed, we multiply by two to preserve the drag handle under the mouse. I totally agree that this is an argument against centering. Let's gather those in  issue 598805 .

Sign in to add a comment