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

Commit

Permalink
fix(input): delegate clicks in IE10
Browse files Browse the repository at this point in the history
pointer-events: none does not work in IE10

Fixes #1394. Closes #2204.
  • Loading branch information
Marcy Sutton authored and ThomasBurleson committed Apr 8, 2015
1 parent 3ca2a63 commit d0b427d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/input/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ function mdInputContainerDirective($mdTheming, $parse) {

self.isErrorGetter = $attrs.mdIsError && $parse($attrs.mdIsError);

self.delegateClick = function() {
self.input.focus();
};
self.element = $element;
self.setFocused = function(isFocused) {
$element.toggleClass('md-input-focused', !!isFocused);
Expand Down Expand Up @@ -325,7 +328,9 @@ function placeholderDirective() {
var placeholderText = attr.placeholder;
element.removeAttr('placeholder');

inputContainer.element.append('<div class="md-placeholder">' + placeholderText + '</div>');
var placeholder = '<div class="md-placeholder" ng-click="delegateClick()">' +
placeholderText + '</div>';
inputContainer.element.append(placeholder);
}
}

Expand Down

0 comments on commit d0b427d

Please sign in to comment.