mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
fix show/hide when disabled
This commit is contained in:
@@ -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`
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user