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

'md-select' causes 'md-fab-speed-dial' to trigger #8527

Closed
drorsou opened this issue May 22, 2016 · 2 comments
Closed

'md-select' causes 'md-fab-speed-dial' to trigger #8527

drorsou opened this issue May 22, 2016 · 2 comments
Assignees
Labels
has: Pull Request A PR has been created to address this issue
Milestone

Comments

@drorsou
Copy link

drorsou commented May 22, 2016

Actual behavior:

  • What is the issue? I have md-select and md-fab-speed-dial in my code, and when I click on the md-select element it also opens up the md-fab-speed-dial element.
  • What is the expected behavior? These are seperate elements, md-fab-speed-dial shouldn't open.

CodePen or Steps to reproduce the issue: *

Angular Versions: *

  • Angular Version: 1.5.3
  • Angular Material Version: 1.1.0-rc2

Additional Information:

  • Browser Type: Chrome
  • Browser Version: 50.0.2661.102
  • OS:
  • Stack Traces:

Shortcut to create a new CodePen Demo.
Note: * indicates required information. Without this information, your issue may be auto-closed.

Do not modify the titles or questions. Simply add your responses to the ends of the questions.
Add more lines if needed.

@ThomasBurleson ThomasBurleson added the P1: urgent Urgent issues that should be addressed in the next minor or patch release. label May 23, 2016
@ThomasBurleson ThomasBurleson added this to the 1.1.0 milestone May 23, 2016
@topherfangio
Copy link
Contributor

It appears that the <md-select> component sets the isOpen property on the scope: https://github.com/angular/material/blob/master/src/components/select/select.js#L346

It used to read scope.$apply('isOpen = true');, so I assume the select is indeed watching that variable or something. Ideally, we would watch a variable on our controller similar to how the speed dial works.

As a quick workaround, you should be able to use something other than isOpen in your md-open expression on the speed dial so that there isn't a conflict.

@drorsou
Copy link
Author

drorsou commented May 25, 2016

Thanks for the solution. :)

@ThomasBurleson ThomasBurleson removed the P1: urgent Urgent issues that should be addressed in the next minor or patch release. label Jun 6, 2016
topherfangio added a commit to profoundry-us/material that referenced this issue Jun 6, 2016
Fix styles and code to follow pristine/dirty styling of other
input elements and provide CSS class for stand-alone usage.

 - Select now behaves like a normal input, appearing as invalid
   if the user focuses/blurs the element, or submits the form,
   without selecting an option.
 - Fix issues with floating labels not working on focus.
 - Add new `md-no-underline` CSS class to allow for stand-alone
   usage (non-form).
 - Update demos to show new stand-alone usage.

Additionally, the select component currently sets the `isOpen`
variable on the `$scope`. This can cause conflicts if the user
has their own `isOpen` variable on the scope.

Fix by privatizing our own variable to `_mdSelectIsOpen` to
reduce chances of a conflict.

Fixes angular#8529. Fixes angular#7988. Fixes angular#8527.
@topherfangio topherfangio added the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Jun 6, 2016
@topherfangio topherfangio added has: Pull Request A PR has been created to address this issue and removed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs labels Jun 6, 2016
topherfangio added a commit to profoundry-us/material that referenced this issue Jun 9, 2016
Fix styles and code to follow pristine/dirty styling of other
input elements and provide CSS class for stand-alone usage.

 - Select now behaves like a normal input, appearing as invalid
   if the user focuses/blurs the element, or submits the form,
   without selecting an option.
 - Fix issues with floating labels not working on focus.
 - Add new `md-no-underline` CSS class to allow for stand-alone
   usage (non-form).
 - Update demos to show new stand-alone usage with required
   example.
 - Standardize asterisk visibility when required when standalone
   or inside of a `<md-input-container>`

Additionally, the select component currently sets the `isOpen`
variable on the `$scope`. This can cause conflicts if the user
has their own `isOpen` variable on the scope.

Fix by privatizing our own variable to `_mdSelectIsOpen` to
reduce chances of a conflict.

Fixes angular#8529. Fixes angular#7988. Fixes angular#8527.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has: Pull Request A PR has been created to address this issue
Projects
None yet
Development

No branches or pull requests

3 participants