Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions src/component/selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
}

Expand All @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 0 additions & 5 deletions src/component/sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down