Closed Bug 830324 Opened 11 years ago Closed 11 years ago

Show a border around the textbox when editing values in the Variables View

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 21

People

(Reporter: vporof, Assigned: vporof)

References

Details

Attachments

(1 file)

Mihai pointed out today that entering "edit mode" (when clicking on a variable or property value) isn't always obvious just by showing a selection.
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Priority: -- → P3
Attached patch v1Splinter Review
UL IS HARD.
Attachment #707700 - Flags: review?(mihai.sucan)
Depends on: 830388
Comment on attachment 707700 [details] [diff] [review]
v1

Review of attachment 707700 [details] [diff] [review]:
-----------------------------------------------------------------

Much better. Thank you!

::: browser/devtools/shared/VariablesView.jsm
@@ +2230,5 @@
> +    // Can't use clientWidth because labels may have extra unnecessary padding.
> +    let style = this.window.getComputedStyle(aLabel);
> +    input.width = (parseInt(style.getPropertyValue("width")) ||
> +      ELEMENT_INPUT_DEFAULT_WIDTH) + // No content previously available.
> +      ELEMENT_INPUT_EXTRA_SPACE; // Extra space added for editing.

Why  do you need to set the input width and all this trouble?
Attachment #707700 - Flags: review?(mihai.sucan) → review+
(In reply to Victor Porof [:vp] from comment #1)
> Created attachment 707700 [details] [diff] [review]
> v1
> 
> XUL IS HARD.

I KNOW.
(In reply to Mihai Sucan [:msucan] from comment #2)
> Comment on attachment 707700 [details] [diff] [review]
> v1
> 
> Review of attachment 707700 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Much better. Thank you!
> 
> ::: browser/devtools/shared/VariablesView.jsm
> @@ +2230,5 @@
> > +    // Can't use clientWidth because labels may have extra unnecessary padding.
> > +    let style = this.window.getComputedStyle(aLabel);
> > +    input.width = (parseInt(style.getPropertyValue("width")) ||
> > +      ELEMENT_INPUT_DEFAULT_WIDTH) + // No content previously available.
> > +      ELEMENT_INPUT_EXTRA_SPACE; // Extra space added for editing.
> 
> Why  do you need to set the input width and all this trouble?

Because the input doesn't initially exist. The value is shown as a label, then on click replaceChild with the textbox. Since that has an arbitrary default width (useful shit right there!), you'll need to manually calculate all this.
https://hg.mozilla.org/mozilla-central/rev/73ccb94a810d
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 21
Depends on: 843104
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: