Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Filter field: Clear all button requires 2 clicks #435

Closed
myieye opened this issue Jan 15, 2020 · 0 comments · Fixed by #437
Closed

Filter field: Clear all button requires 2 clicks #435

myieye opened this issue Jan 15, 2020 · 0 comments · Fixed by #437
Assignees
Labels
bug A broken behaviour that was working previously has-pr P2 Issue that is important to resolve as soon as possible

Comments

@myieye
Copy link
Contributor

myieye commented Jan 15, 2020

Bug Report

Expected Behavior

"Clear all" should clear all (editable) fields on a single click

Current Behavior

I have to click "Clear all" twice to remove the fields
(In some cases the button never has a (visual) effect no matter how often I click it until I scroll, but I can't reproduce this consistantly, so hopefully it's the same problem)

Steps to Reproduce

https://barista.dynatrace.com/components/filter-field/#readonly-non-deletable--non-editable-tags

  1. Add an editable field to the filter-field
  2. Click "Clear all"
@myieye myieye added the bug A broken behaviour that was working previously label Jan 15, 2020
@tomheller tomheller added the P2 Issue that is important to resolve as soon as possible label Jan 15, 2020
@tomheller tomheller added this to the Filter field milestone Jan 15, 2020
@tomheller tomheller changed the title Filter-field clear all button requires 2 clicks Filter field clear all button requires 2 clicks Jan 15, 2020
@tomheller tomheller changed the title Filter field clear all button requires 2 clicks Filter field: Clear all button requires 2 clicks Jan 15, 2020
tomheller added a commit that referenced this issue Jan 16, 2020
…ality.

The clearAll button rendering depended on the filterfield not being
focussed. When the clearAll button was rendered and was clicked, the
cdkFocusMonitor kicked in, set the focus and removed the clearAll button
again. As a result the clearAll button lost its focus, the document
focus was set back to the body and the clearAll was rendered again. The
click event on the clearAll was never fired.
We no longer remove the clearAll from the DOM, but hide it via css
classes. This makes it not lose focus, and results in a more consistent
behavior.

Fixes #435
tomheller added a commit that referenced this issue Jan 16, 2020
…ality.

The clearAll button rendering depended on the filterfield not being
focussed. When the clearAll button was rendered and was clicked, the
cdkFocusMonitor kicked in, set the focus and removed the clearAll button
again. As a result the clearAll button lost its focus, the document
focus was set back to the body and the clearAll was rendered again. The
click event on the clearAll was never fired.
We no longer remove the clearAll from the DOM, but hide it via css
classes. This makes it not lose focus, and results in a more consistent
behavior.

Fixes #435
tomheller added a commit that referenced this issue Jan 20, 2020
…ality.

The clearAll button rendering depended on the filterfield not being
focussed. When the clearAll button was rendered and was clicked, the
cdkFocusMonitor kicked in, set the focus and removed the clearAll button
again. As a result the clearAll button lost its focus, the document
focus was set back to the body and the clearAll was rendered again. The
click event on the clearAll was never fired.
We no longer remove the clearAll from the DOM, but hide it via css
classes. This makes it not lose focus, and results in a more consistent
behavior.

Fixes #435
@tomheller tomheller self-assigned this Jan 20, 2020
tomheller added a commit that referenced this issue Jan 22, 2020
…ality.

The clearAll button rendering depended on the filterfield not being
focussed. When the clearAll button was rendered and was clicked, the
cdkFocusMonitor kicked in, set the focus and removed the clearAll button
again. As a result the clearAll button lost its focus, the document
focus was set back to the body and the clearAll was rendered again. The
click event on the clearAll was never fired.
We no longer remove the clearAll from the DOM, but hide it via css
classes. This makes it not lose focus, and results in a more consistent
behavior.

Fixes #435
tomheller added a commit that referenced this issue Jan 22, 2020
…ality.

The clearAll button rendering depended on the filterfield not being
focussed. When the clearAll button was rendered and was clicked, the
cdkFocusMonitor kicked in, set the focus and removed the clearAll button
again. As a result the clearAll button lost its focus, the document
focus was set back to the body and the clearAll was rendered again. The
click event on the clearAll was never fired.
We no longer remove the clearAll from the DOM, but hide it via css
classes. This makes it not lose focus, and results in a more consistent
behavior.

Fixes #435
tomheller added a commit that referenced this issue Jan 31, 2020
…ality.

The clearAll button rendering depended on the filterfield not being
focussed. When the clearAll button was rendered and was clicked, the
cdkFocusMonitor kicked in, set the focus and removed the clearAll button
again. As a result the clearAll button lost its focus, the document
focus was set back to the body and the clearAll was rendered again. The
click event on the clearAll was never fired.
We no longer remove the clearAll from the DOM, but hide it via css
classes. This makes it not lose focus, and results in a more consistent
behavior.

Fixes #435
ffriedl89 pushed a commit that referenced this issue Feb 4, 2020
…ality.

The clearAll button rendering depended on the filterfield not being
focussed. When the clearAll button was rendered and was clicked, the
cdkFocusMonitor kicked in, set the focus and removed the clearAll button
again. As a result the clearAll button lost its focus, the document
focus was set back to the body and the clearAll was rendered again. The
click event on the clearAll was never fired.
We no longer remove the clearAll from the DOM, but hide it via css
classes. This makes it not lose focus, and results in a more consistent
behavior.

Fixes #435
github-actions bot pushed a commit that referenced this issue Feb 4, 2020
…ality.

The clearAll button rendering depended on the filterfield not being
focussed. When the clearAll button was rendered and was clicked, the
cdkFocusMonitor kicked in, set the focus and removed the clearAll button
again. As a result the clearAll button lost its focus, the document
focus was set back to the body and the clearAll was rendered again. The
click event on the clearAll was never fired.
We no longer remove the clearAll from the DOM, but hide it via css
classes. This makes it not lose focus, and results in a more consistent
behavior.

Fixes #435
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A broken behaviour that was working previously has-pr P2 Issue that is important to resolve as soon as possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants