Scratch-blocks: "Create variable" button click is only on the button text, not the button rect

Created on 13 Jun 2017  路  7Comments  路  Source: LLK/scratch-blocks

Expected Behavior

Clicking anywhere on the "create variable" button makes the modal appear.

Actual Behavior

Only clicking on the text makes the modal appear.

Steps to Reproduce

Open the vertical playground
Go to the "Data" category
Click on the background of the "create variable" button

Operating System and Browser

Ubuntu, Chrome

bug help wanted touch

Most helpful comment

We fixed this issue internally (at least for Android) by adding a transparent background to the flyout label attributes in the call to create the background rectangle in Blockly.FlyoutButton.prototype.createDom.

All 7 comments

Can't repro on MacOS, Chrome (latest) but we should try to repro on Ubuntu.

There is some funky behavior on that button. Sometimes clicking the whole button works, but sometimes it doesn't. Here is a gif of what I saw. Note that cursor style correlates directly with clickability, so any time you see the hand it was possible to click.

funky-click-behavior

@paulkaplan that matches what I was seeing. It seems like once you hit the text it becomes clickable, and then stays clickable to the edge of the button, but I'm not sure.

I quickly checked the Blockly playground and couldn't repro, but that button is styled pretty differently.

@paulkaplan I'm seeing this behavior as well.

We fixed this issue internally (at least for Android) by adding a transparent background to the flyout label attributes in the call to create the background rectangle in Blockly.FlyoutButton.prototype.createDom.

@rachel-fenichel I can hover over the text and then click anywhere in the box, but it seems like the event listener is only attached to the text with a mouseover event with a mouseout on the rectangle.

On touch on chrome OS this problem makes the buttons very difficult to click (usually takes six or seven tries).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bfunc picture bfunc  路  5Comments

tmickel picture tmickel  路  6Comments

tmickel picture tmickel  路  3Comments

Alzter picture Alzter  路  3Comments

towerofnix picture towerofnix  路  6Comments