Skip to content

Commit 2c71f64

Browse files
committed
Perf: remove blur on button for now. Not essential and has perf hit
1 parent bba80d8 commit 2c71f64

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/primitives/button/button.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { defineComponent } from '@semantic-ui/component';
22
import { get, inArray } from '@semantic-ui/utils';
33

4-
import componentSpec from './specs/button-component.js';
5-
import template from './button.html?raw';
64
import css from './button-bundle.css?raw';
5+
import template from './button.html?raw';
6+
import componentSpec from './specs/button-component.js';
77

88
const createComponent = ({ el, self, settings, data, $ }) => ({
99
isIconBefore() {
@@ -21,9 +21,9 @@ const createComponent = ({ el, self, settings, data, $ }) => ({
2121
},
2222
performAction() {
2323
const formActions = ['submit', 'reset'];
24-
if(inArray(settings.type, formActions)) {
24+
if (inArray(settings.type, formActions)) {
2525
const form = self.getForm();
26-
if(form) {
26+
if (form) {
2727
$(form).trigger(settings.type);
2828
}
2929
}
@@ -45,7 +45,7 @@ const events = {
4545
},
4646
'click .button'({ event, self, $ }) {
4747
self.performAction();
48-
$(this).blur();
48+
// $(this).blur();
4949
},
5050
'keydown .button'({ event, self, $ }) {
5151
let $button = $(this);

0 commit comments

Comments
 (0)