From 3ff8d811ef45f197bd751af841ca0a91ee31ec78 Mon Sep 17 00:00:00 2001 From: chieveit Date: Tue, 2 Jun 2020 07:52:12 +0000 Subject: [PATCH] delete weird input element in selector --- src/component/selector.js | 20 +------------------- src/component/sheet.js | 5 ----- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/src/component/selector.js b/src/component/selector.js index 5b70d626..5d596474 100644 --- a/src/component/selector.js +++ b/src/component/selector.js @@ -6,9 +6,7 @@ const selectorHeightBorderWidth = 2 * 2 - 1; let startZIndex = 10; class SelectorElement { - constructor(useHideInput = false) { - this.useHideInput = useHideInput; - this.inputChange = () => {}; + constructor() { this.cornerEl = h('div', `${cssPrefix}-selector-corner`); this.areaEl = h('div', `${cssPrefix}-selector-area`) .child(this.cornerEl).hide(); @@ -18,14 +16,6 @@ class SelectorElement { .css('z-index', `${startZIndex}`) .children(this.areaEl, this.clipboardEl, this.autofillEl) .hide(); - if (useHideInput) { - this.hideInput = h('input', '') - .on('compositionend', (evt) => { - this.inputChange(evt.target.value); - }); - this.el.child(this.hideInputDiv = h('div', 'hide-input').child(this.hideInput)); - this.el.child(this.hideInputDiv = h('div', 'hide-input').child(this.hideInput)); - } startZIndex += 1; } @@ -50,10 +40,6 @@ class SelectorElement { top: top - 0.8, }; this.areaEl.offset(of).show(); - if (this.useHideInput) { - this.hideInputDiv.offset(of); - this.hideInput.val('').focus(); - } } setClipboardOffset(v) { @@ -195,15 +181,11 @@ function setAllClipboardOffset(offset) { export default class Selector { constructor(data) { - this.inputChange = () => {}; this.data = data; this.br = new SelectorElement(true); this.t = new SelectorElement(); this.l = new SelectorElement(); this.tl = new SelectorElement(); - this.br.inputChange = (v) => { - this.inputChange(v); - }; this.br.el.show(); this.offset = null; this.areaOffset = null; diff --git a/src/component/sheet.js b/src/component/sheet.js index 0c34d2dd..b8874293 100644 --- a/src/component/sheet.js +++ b/src/component/sheet.js @@ -612,11 +612,6 @@ function sheetInitEvents() { if (offsetX <= 0) rowResizer.hide(); }); - selector.inputChange = (v) => { - dataSetCellText.call(this, v, 'input'); - editorSet.call(this); - }; - // slide on mobile bindTouch(overlayerEl.el, { move: (direction, d) => {