stuff
This commit is contained in:
parent
3329e98cf8
commit
dfe8d32262
|
@ -5491,11 +5491,9 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins || {}, cleanUps: BDFDB && BDFDB
|
||||||
LibraryComponents.CharCounter = reactInitialized ? class BDFDB_CharCounter extends LibraryModules.React.Component {
|
LibraryComponents.CharCounter = reactInitialized ? class BDFDB_CharCounter extends LibraryModules.React.Component {
|
||||||
updateCounter(e) {
|
updateCounter(e) {
|
||||||
clearTimeout(this.updateTimeout);
|
clearTimeout(this.updateTimeout);
|
||||||
this.updateTimeout(() => {
|
this.updateTimeout = setTimeout(() => {
|
||||||
delete this.updateTimeout;
|
delete this.updateTimeout;
|
||||||
let string = e.string || "";
|
let string = e.string || "", start = e.start || 0, end = e.end || 0;
|
||||||
let start = e.start || 0;
|
|
||||||
let end = e.end || 0;
|
|
||||||
let length = this.props.parsing ? BDFDB.StringUtils.getParsedLength(string) : string.length;
|
let length = this.props.parsing ? BDFDB.StringUtils.getParsedLength(string) : string.length;
|
||||||
let select = end - start == 0 ? 0 : (this.props.parsing ? BDFDB.StringUtils.getParsedLength(string.slice(start, end)) : (end - start));
|
let select = end - start == 0 ? 0 : (this.props.parsing ? BDFDB.StringUtils.getParsedLength(string.slice(start, end)) : (end - start));
|
||||||
select = !select ? 0 : (select > length ? length - (length - end - start) : select);
|
select = !select ? 0 : (select > length ? length - (length - end - start) : select);
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue