jquery / jquery/jquery-ui

border-box elements with a padding are wrongly resized, since 1.14.1

Open
#2,382 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Behavior different from 1.12 Bug Comp: Resizable
Dominant language
JavaScript
Stars
11.3k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

The width of the elements "jumps" by the value of the element's padding when box-sizing is set to border-box

Here is a jsfiddle showing the issue. Try resizing the element slowly and you'll notice a width/height jump.

https://jsfiddle.net/frgnt8ms/3/

The behavior was correct in version 1.14.0 (you can try changing the version in the fiddle).
The bug started happening in version 1.14.1.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the resize behavior in the linked JSFiddle with box-sizing set to border-box, then compare it against jQuery UI 1.14.0 and 1.14.1. Trace the resizing path to find the regression and verify that padded border-box elements resize continuously without a width or height jump.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.