fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Button and toggle background changing colors randomly

Open holysnake91 opened this issue 9 years ago • 5 comments

Bug Report

  • Package version(s): 4.32.0
  • Browser and OS versions: Chrome

Describe the issue:

I was using primary button, toggle in the component. The background color will random apply by green, pink or blue.

Expected the color will always be blue.

What happen?

Actual behavior:

The color i get this apply the css class css-15f5vz1 image

this apply the css class css-3pepvq image

Expected behavior:

the correct css class was css-19sbuve image

holysnake91 avatar Aug 14 '17 04:08 holysnake91

Are you manually adding the class name css-15f5vz1 or is that the class name that has the background color?

There is nothing in our code that should be changing those backgrounds on their own. It appears that something in your application is overriding the themePrimary color.

micahgodbolt avatar Aug 14 '17 16:08 micahgodbolt

Nope, those css class was generated by UI Fabric component and it has the background colour.

Below is the code i use for toggle <Toggle id="arvsys-provt-tglApprover" checked={this.state.requireAprv} label="" onText={strings.getString('yes')} offText={strings.getString('no')} onChanged={(value) => this.onRequireAprvChange(value)} />

<Toggle id="arvsys-provt-tglkeepPermission" checked={this.state.keepPermission} label="" onText={strings.getString('yes')} offText={strings.getString('no')} onChanged={(value) => { this.setState({ keepPermission: value }); }} />

and this for the primary button

<PrimaryButton id="arvsys-provt-btnBackEditPermission" text={strings.getString('back')} onClick={() => this.props.backStage(this.state.selectedTemplateID)} type="button" />

<PrimaryButton id="arvsys-provt-btnNextEditPermission" text={this.props.action === 0 ? strings.getString('create') : strings.getString('update')} disabled={this.btnDisable()} onClick={() => this.submit()} type="button" />

i didn't add any customize css class to those.

and the result for the html rendering, the css class name that have the background color was changing the name every time different deploy

for toggle image

for primary button image

holysnake91 avatar Aug 15 '17 02:08 holysnake91

And same code for another site, i get pink

for toggle image

for button image

holysnake91 avatar Aug 15 '17 02:08 holysnake91

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Fabric React!

stale[bot] avatar Apr 11 '18 10:04 stale[bot]

This issue has been automatically closed because it has not had recent activity after being marked as stale. If you belive this issue is still a problem or should be reopened, please reopen it! Thank you for your contributions to Fabric React! Why am I receiving this notification?

stale[bot] avatar May 18 '18 20:05 stale[bot]