Make it run better in IE11
This commit is contained in:
parent
91e5556c86
commit
29a225ed13
File diff suppressed because one or more lines are too long
@ -198,6 +198,7 @@ i[class*=' icon-']:before {
|
|||||||
.connect {
|
.connect {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -357,6 +358,10 @@ i[class*=' icon-']:before {
|
|||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chat-server .chat-title {
|
||||||
|
padding-right: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
.chat-topic-wrap {
|
.chat-topic-wrap {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -573,6 +578,7 @@ i[class*=' icon-']:before {
|
|||||||
|
|
||||||
.settings {
|
.settings {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.settings p {
|
.settings p {
|
||||||
|
@ -33,7 +33,8 @@ export default class Editable extends PureComponent {
|
|||||||
const padding =
|
const padding =
|
||||||
parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
|
parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
|
||||||
// Make sure the width is atleast 1px so the caret always shows
|
// Make sure the width is atleast 1px so the caret always shows
|
||||||
const width = stringWidth(value, style.font) || 1;
|
const width =
|
||||||
|
stringWidth(value, `${style.fontSize} ${style.fontFamily}`) || 1;
|
||||||
return padding + width;
|
return padding + width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -69,6 +70,12 @@ export default class Editable extends PureComponent {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleFocus = e => {
|
||||||
|
const val = e.target.value;
|
||||||
|
e.target.value = '';
|
||||||
|
e.target.value = val;
|
||||||
|
};
|
||||||
|
|
||||||
inputRef = el => {
|
inputRef = el => {
|
||||||
this.input = el;
|
this.input = el;
|
||||||
};
|
};
|
||||||
@ -90,6 +97,7 @@ export default class Editable extends PureComponent {
|
|||||||
onBlur={this.handleBlur}
|
onBlur={this.handleBlur}
|
||||||
onChange={this.handleChange}
|
onChange={this.handleChange}
|
||||||
onKeyDown={this.handleKey}
|
onKeyDown={this.handleKey}
|
||||||
|
onFocus={this.handleFocus}
|
||||||
style={style}
|
style={style}
|
||||||
spellCheck={false}
|
spellCheck={false}
|
||||||
/>
|
/>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import 'es6-promise/auto';
|
import 'es6-promise/auto';
|
||||||
|
import 'utils/ie11';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { render } from 'react-dom';
|
import { render } from 'react-dom';
|
||||||
|
|
||||||
|
12
client/src/js/utils/ie11.js
Normal file
12
client/src/js/utils/ie11.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
if (Object.keys) {
|
||||||
|
try {
|
||||||
|
Object.keys('');
|
||||||
|
} catch (e) {
|
||||||
|
Object.keys = function(o, k, r) {
|
||||||
|
r = [];
|
||||||
|
// eslint-disable-next-line
|
||||||
|
for (k in o) r.hasOwnProperty.call(o, k) && r.push(k);
|
||||||
|
return r;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user