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

Disabled fieldset won't apply disabled styles to child elements #7639

Closed
antoinebrault opened this issue Mar 18, 2016 · 4 comments
Closed

Disabled fieldset won't apply disabled styles to child elements #7639

antoinebrault opened this issue Mar 18, 2016 · 4 comments
Assignees
Labels
P4: minor Minor issues. May not be fixed without community contributions. type: enhancement
Milestone

Comments

@antoinebrault
Copy link

Fields/buttons in a disabled fieldset should have the same style as disabled fields/buttons.
http://jsbin.com/gajohacimo/1/edit?html,js,output

See #895
66fa1e3#diff-f95bd6261dc8555a2e9557219ff9851d
was modified in
5da3c45#diff-f95bd6261dc8555a2e9557219ff9851d

@antoinebrault
Copy link
Author

Should probably be:

.md-input {
    &[disabled],
    [disabled] & {
    [disabled] {
        ...
    }
}

@topherfangio topherfangio added type: enhancement P4: minor Minor issues. May not be fixed without community contributions. labels Mar 18, 2016
@topherfangio topherfangio added this to the Backlog milestone Mar 18, 2016
@crisbeto
Copy link
Member

@topherfangio I've fixed the issue for inputs and buttons, however there are quite a few components that have [disabled] styles, but don't account for the parent being disabled. Here's the full list:

  • autocomplete
  • button
  • checkbox
  • datepicker
  • input
  • radio
  • select
  • slider
  • switch
  • tabs

This might turn into a pretty large amount of changes since some components (like the checkbox) would also need to traverse the DOM in order to determine whether to disable the interaction. Do we really want to jump down this rabbit hole?

Alternatively a pretty quick and easy fix (note that it doesn't work in IE10 and below) could be to only account for the "static" state (for example a button that isn't being hovered) and use pointer-events to disable any hovers or clicks:

fieldset[disabled]{
  pointer-events: none;
}

@topherfangio
Copy link
Contributor

@crisbeto I think this would be a great addition, but I honestly think we have some higher-priority issues to address first, so I would hold off on any work on this for now.

@crisbeto crisbeto modified the milestones: 1.3.0, Backlog Apr 14, 2016
@ThomasBurleson ThomasBurleson modified the milestones: 1.3.0, Backlog Apr 20, 2016
@ThomasBurleson ThomasBurleson modified the milestones: - Backlog, Deprecated May 26, 2016
@ThomasBurleson
Copy link
Contributor

This issue is closed as part of our ‘Surge Focus on Material 2' efforts.
For details, see our forum posting @ http://bit.ly/1UhZyWs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P4: minor Minor issues. May not be fixed without community contributions. type: enhancement
Projects
None yet
Development

No branches or pull requests

4 participants