Skip to content

Color dropdown may be incorrectly positioned on Firefox #11355

@PetteriAimonen

Description

@PetteriAimonen

I hit this pxt-ev3 issue after upgrading pxt-core from 12.3.10 to 12.3.14, and still have the problem on 12.3.16.

On Chrome everything works fine, but on Firefox the pxtblocks/fields/field_colour.ts dropdown gets positioned at the top left corner of the page instead of near the field.

I traced this down to borderRect having 0 width, which causes different behavior in browser getBoundingClientRect().

I have it fixed locally by forcing borderRect to have a width, and I'm not sure what change actually caused the problem to appear. I'm just posting this to save somebody time in case it affects other target platforms. Feel free to close if you consider this not a bug in the pxt-core and that this is something targets need to handle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions