Skip to content

Setting borderWidth to 0 defaults back to 1 #68

@NickH-nz

Description

@NickH-nz

This Issue is about a bug in API v2.0.5

My aim is to not show a border around the input field.

When setting the borderWidth to 0, it counts as not being set and defaults to 1. Setting to -1 works around the issue and allows the border to be hidden.

The borderWidth property does not do a comprehensive check to see if it is defined. Other properties have a more comprehensive check that should be applied to all numeric options.

The issue can be found here:
https://github.com/orange-games/phaser-input/blob/master/build/phaser-input.js#L599

Old:

_this.borderWidth = inputOptions.borderWidth || 1;

New:

_this.borderWidth = (typeof inputOptions.borderWidth === 'number') ? inputOptions.borderWidth : 1;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy