Opened 16 months ago

Last modified 16 months ago

#15226 new bug

style.height being forced on canvas after dragging element on recent Chrome versions

Reported by: Hexalys Owned by:
Priority: minor Milestone: none
Component: ui.draggable Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Hexalys)

I have a product builder using Draggable (https://pridesash.com/builder/#step/1) which used to work fine with UI 1.10 or under. I now suddenly find myself with a bug on newer chrome versions since using UI 1.11.4 (I think).

When dragging a canvas element, for some reason, jQueryUI now sets a css style 'height' on Chrome 59+ (at least) in addition to 'left' and 'top'. That 'height' isn't set on Chrome 49, Safari, Firefox or Edge. Only recent Chrome versions. I assume this 'height' might be related to a different unrelated chrome bug.

I was relying only on the 'width' and 'height' attributes of the canvas for the canvas proportions. This new unnecessary introduced 'height' messes up proportions of canvas boxes when re-editing a piece of canvas text.

This now forces me to set css style 'height' and 'width' every time to prevent the ui 'height' from affecting canvas proportions and either shrinking or expanding the box width. But that shouldn't be required.

Any clue has to what this new 'height' comes from? And could it be removed so canvas proportion aren't affected by it?

For the REPRO: You can test at: https://pridesash.com/builder/ with the following steps:

Select a sash, open the chrome inspector, and on Step 2, drag the "Class of 2017" box down. You will see that the original canvas element height I now set in subpixel (67.35ish px for patching the bug with both width and height) will turn into 67px as set by jQuery UI. Which only happens on newest Chrome.

Change History (5)

comment:1 Changed 16 months ago by Hexalys

Description: modified (diff)

comment:2 Changed 16 months ago by Hexalys

Description: modified (diff)

comment:3 Changed 16 months ago by Hexalys

Description: modified (diff)

comment:4 Changed 16 months ago by Hexalys

Description: modified (diff)

comment:5 Changed 16 months ago by Hexalys

Description: modified (diff)
Note: See TracTickets for help on using tickets.