fix show/hide when disabled

pull/411/head
Cory LaViska 2021-04-01 09:02:25 -04:00
rodzic 26bfe8ef11
commit 2e893bbaf2
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -11,6 +11,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis
- Added `click()` method to `sl-checkbox`, `sl-radio`, and `sl-switch`
- Fixed a bug in `sl-tooltip` where events weren't properly cleaned up on disconnect
- Fixed a bug in `sl-tooltip` where they wouldn't display after toggling `disabled` off and on again [#391](https://github.com/shoelace-style/shoelace/issues/391)
- Fixed a bug in `sl-details` where `show()` and `hide()` would toggle the control when disabled
- Fixed incorrect event names for `sl-after-show` and `sl-after-hide` in `sl-details`
- Improved a11y for disabled buttons that are rendered as links
- Improved a11y for `sl-button-group`

Wyświetl plik

@ -74,7 +74,7 @@ export default class SlDetails extends LitElement {
/** Shows the alert. */
show() {
// Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher
if (this.isVisible) {
if (this.isVisible || this.disabled) {
return;
}
@ -103,7 +103,7 @@ export default class SlDetails extends LitElement {
/** Hides the alert */
hide() {
// Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher
if (!this.isVisible) {
if (!this.isVisible || this.disabled) {
return;
}