Fabric.js: Borders enter transparent state immediately on select

Created on 8 Nov 2018  路  6Comments  路  Source: fabricjs/fabric.js

Version

2.4.1+

Test Case

http://jsfiddle.net/d8bmvp4s/1/

Information about environment

Newest version of Chrome w/ Windows 7

Steps to reproduce

The fiddle automatically sets the object as active in which case the border is completely black.. When clicking off and setting the box as active again with the cursor, the border either highlights back to black or remains in a transparent state. It's completely random, and if you click off and back onto it several times, it will alternate between states. This behavior now occurs in all fabricjs examples.

Expected Behavior

The border should be black when selected, and grey when being altered.
defaultstate

Actual Behavior

The border states seem to alternate between the black and grey version on select. One moment it will select with a black border, and another moment it will be grey.
reproduction

bug

All 6 comments

hard to reproduce. i wonder if if a side effect of a slight move. But anyway does not fire a move event, just tested.

hard to reproduce. i wonder if if a side effect of a slight move. But anyway does not fire a move event, just tested.

I don't know why, but i'm getting it quite consistently. The sample canvas on the fabricjs.com front page actually always highlights as the transparent border, until you scroll down to the lady bug animation, in which case you'll see the border cycle from transparent to it's correct color.

frontpage

i managed to replicate like twice on 50 times tried, but that does not means is not a bug.

@asturur It looks like the bug is introduced in version 2.4.1

Everything up to 2.4.0 is working fine.

probably that 'avoid extra renders' thing i did. Guys is so hard to have a comprensive testing strategy

probably that 'avoid extra renders' thing i did. Guys is so hard to have a comprensive testing strategy

I would assume that's why the borders fix themselves when an animation plays.

Was this page helpful?
0 / 5 - 0 ratings