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

Commit e8cbc95

Browse files
Nissan HaninaThomasBurleson
authored andcommitted
fix(input): IE perf with attribute selectors for ngMessages
IE manifest huge performance issues with attribute selectors. Reproduce this very easily using `UI Responsivess` tab in IE11 developer tools: * duplicate the amount of ` :not` selectors prefixed with space and * measure the time it takes for IE to calculate layout(in green). Closes #7360 # Conflicts: # src/components/input/demoErrors/index.html
1 parent 4bdda21 commit e8cbc95

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/components/input/demoErrors/index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<md-input-container class="md-block">
77
<label>Description</label>
8-
<input md-maxlength="30" required name="description" ng-model="project.description">
8+
<input md-maxlength="30" required md-no-asterisk name="description" ng-model="project.description">
99
<div ng-messages="projectForm.description.$error">
1010
<div ng-message="required">This is required.</div>
1111
<div ng-message="md-maxlength">The name has to be less than 30 characters long.</div>
@@ -57,10 +57,11 @@
5757
doubt event Bill Clinton could afford that.
5858
</div>
5959
</div>
60-
<p>
61-
Make sure to include <a href="https://docs.angularjs.org/api/ngMessages" target="_blank">ngMessages</a> module when using ng-message markup.
62-
</p>
6360
</md-input-container>
61+
62+
<p style="font-size:.8em; width: 100%; text-align: center;">
63+
Make sure to include <a href="https://docs.angularjs.org/api/ngMessages" target="_blank">ngMessages</a> module when using ng-message markup.
64+
</p>
6465
</form>
6566
</md-content>
6667

src/components/input/input-theme.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ md-input-container.md-THEME_NAME-theme {
2020
ng-message, data-ng-message, x-ng-message,
2121
[ng-message], [data-ng-message], [x-ng-message],
2222
[ng-message-exp], [data-ng-message-exp], [x-ng-message-exp] {
23-
:not(.md-char-counter) {
24-
color: '{{warn-A700}}';
23+
color: '{{warn-A700}}';
24+
.md-char-counter {
25+
color: '{{foreground-1}}';
2526
}
2627
}
2728

0 commit comments

Comments
 (0)