Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tags 'View Rules' disappearing bug (Firefox) #5732

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

sunny-b
Copy link
Contributor

@sunny-b sunny-b commented Jan 26, 2020

What type of PR is this? (check all applicable)

  • Bug Fix

Description

I noticed that, in Firefox, when I'm writing an article and attempt to search for a tag, the tags list will disappear if I click "View Rules" for a certain tag. Only after I bring the tags search back up am I able to view the tag rules.

Screencast:

Firefox tags list bugLink

It looks like when the "View Rules" button is clicked, Chrome considers the button to be the activeElement while Firefox considers the entire tag row to be the activeElement, causing the eventHandler not to work as expected.

This PR fixes it so Firefox works as expected.

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Firefox tags list bug fixedLink

Added to documentation?

  • no documentation needed

[optional] What gif best describes this PR or how it makes you feel?

peekaboo

@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Jan 26, 2020
(activeElement.id === 'tag-input' ||
activeElement.classList.contains(
'articleform__tagsoptionrulesbutton',
) ||
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an FYI, I didn't format it like this. This is what the pre-commit linter spit out.

@citizen428
Copy link
Contributor

Thanks for this @sunny-b! 👍

Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sunny-b!

Tested it manually on Firefox 73b9 and Chrome 79 and it works great!

ps. @sunny-b, remember to name your branches sunny-b/TOPIC-ISSUE_ID according to the contributing guide in the future

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Jan 27, 2020
@sunny-b
Copy link
Contributor Author

sunny-b commented Jan 27, 2020

@rhymes oops sorry. Forgot about that

@benhalpern benhalpern merged commit a86ccff into forem:master Jan 27, 2020
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: reviewed-approved bot applied label for PR's where reviewer approves changes labels Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants