Open
Bug 897405
Opened 12 years ago
Updated 3 years ago
resize command doesn't update the dropdown menu if a preset was selected
Categories
(DevTools :: Responsive Design Mode, defect, P3)
Tracking
(Not tracked)
NEW
People
(Reporter: jorrete, Unassigned)
Details
(Whiteboard: [multiviewport][reserve-rdm])
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release)
Build ID: 20130624104218
Steps to reproduce:
I used the "resize to <width> <height>" command from "Developer Toolbar".
Actual results:
The viewport gets resized well, but the new "resolution" wasn't get updated on "<width>x<height>(custom)" item from the resolutions list.
Expected results:
The "<width>x<height>(custom)" item from the resolutions list must show the new resolution that has been updated with the "resize to <width> <height>" command from "Developer Toolbar".
I finded out that works if in the resolutions list is selected (custom), if you resize with "<width>x<height>(custom)" the custom list item gets updated with the new resolution. But if other resolution is selected in the list, when you use the commnand, the list doesn't get updated.
Comment 2•12 years ago
|
||
I can confirm this bug. Tonight, I'll try to investigate and submit a patch.
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0
Comment 3•12 years ago
|
||
It seems the problem is because this small piece of code from responsivedesign.jsm#setSize:
let selectedPreset = this.menuitems.get(this.selectedItem);
// We uptate the custom menuitem if we are using it
if (selectedPreset.custom) {
selectedPreset.width = aWidth;
selectedPreset.height = aHeight;
this.setMenuLabel(this.selectedItem, selectedPreset);
}
That explains the reported misbehavior. So what should we do? Whenever this method is called, should we set the preset to custom? But if the setSize is called from onDrag, should we pass some flag to the method? Paul?
Comment 4•12 years ago
|
||
Ahh, I forget to ask, please change the bug title to something like "Fix the resize to command".
Updated•12 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Fix the resize to command → resize command doesn't update the dropdown menu if a preset was selected
A variant of this is still present in the new RDM UI. Using `resize to` when a device is selected does set the size, but does not clear the device, like it would if the mouse was used.
Priority: -- → P3
Whiteboard: [multiviewport][reserve-rdm]
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•