Bug Tracker

Ticket #10877 (closed feature: fixed)

Opened 3 years ago

Last modified 8 months ago

Make outerWidth/Height a setter

Reported by: jzaefferer Owned by: mikesherov
Priority: low Milestone: 1.8
Component: dimensions Version: 1.7.1
Keywords: Cc: scott.gonzalez
Blocking: Blocked by:

Description (last modified by rwaldron) (diff)

The math required by the regular boxmodel leaves it traces in a lot of places where we need to set the width or height of an element that has border, padding or margin.

jQuery UI currently extends inner/outer/Width/Height as setters, but we only use the outerXxx methods:  https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.core.js#L132-L174

By actually integrating that in core, the require code would obviously be a lot less. For consistency it might make sense to make both outerXxx and innerXxx a setter, but really only outer is important.

Change History

comment:1 Changed 3 years ago by scott.gonzalez

  • Cc scott.gonzalez added

comment:2 Changed 3 years ago by timmywil

  • Keywords 1.8-discuss added
  • Status changed from new to open
  • Version changed from git to 1.7.1
  • Component changed from unfiled to dimensions
  • Type changed from enhancement to feature

comment:3 Changed 3 years ago by dmethvin

#10994 is a duplicate of this ticket.

comment:4 Changed 3 years ago by jzaefferer

  • Description modified (diff)

+1

comment:5 Changed 3 years ago by jaubourg

+0, Not sure here, what the cost in size?

comment:6 Changed 3 years ago by dmethvin

  • Description modified (diff)

+1, Yes, but as with everything in 1.8 contingent on final size. This intersects with our box-sizing: border-box issues as well.

comment:7 Changed 3 years ago by mikesherov

  • Description modified (diff)

+1, This is something people would expect jQuery to handle, and I'd love to work on this, so yes. Also, we can pretty much just rip the code straight from jquery ui. I do have some concerns though with code paths for hidden elements, but should be fun to implement.

comment:8 Changed 3 years ago by timmywil

-1

comment:9 Changed 3 years ago by rwaldron

  • Description modified (diff)

+1

comment:10 Changed 3 years ago by mikesherov

  • Owner set to mikesherov
  • Status changed from open to assigned

comment:11 Changed 3 years ago by mikesherov

  • Keywords 1.8-discuss removed
  • Priority changed from undecided to low
  • Milestone changed from None to 1.8

comment:12 Changed 3 years ago by ALLPRO

+1 -- have wondered why this was not done a long time ago

comment:14 Changed 3 years ago by timmywil

I'm still a -1 on this feauture, especially given the added size to core.

comment:15 Changed 3 years ago by mikesherov

@timmywil, I hear the concern. There are strategies for smaller size that I outlined in the PR. Thoughts?

comment:16 Changed 3 years ago by Mike Sherov

  • Status changed from assigned to closed
  • Resolution set to fixed

Fix #10877. Make outerWidth/Height a setter. Closes gh-783.

Changeset: e0151e5827d7091f311c82d9f951aaaa2688ba8c

comment:17 Changed 2 years ago by mikesherov

  • Keywords needsdocs added

comment:18 Changed 2 years ago by mikesherov

  • Keywords needsdocs removed

comment:19 Changed 8 months ago by jlgrall

comment:20 Changed 8 months ago by jzaefferer

Note: See TracTickets for help on using tickets.