Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.1.1+] Can not clear column when first cell is readOnly #6246

Closed
mbrainiac opened this issue Sep 5, 2019 · 11 comments
Closed

[7.1.1+] Can not clear column when first cell is readOnly #6246

mbrainiac opened this issue Sep 5, 2019 · 11 comments
Labels
bug Regression Issues that were created while adding new changes to the source code Status: Released

Comments

@mbrainiac
Copy link

Description

Error throw when clear column with readOnly cell in the first row

Uncaught TypeError: Cannot read property 'removeEventListener' of undefined
    at unObserve (autoResize.js:24)
    at Object.unObserve (autoResize.js:165)
    at TextEditor.close (textEditor.js:180)
    at TextEditor.discardEditor (_baseEditor.js:411)
    at TextEditor.cancelChanges (_baseEditor.js:388)
    at Object.waitingForValidator.onQueueEmpty (core.js:1037)
    at Object.checkIfQueueIsEmpty (core.js:984)
    at validateChanges (core.js:1090)
    at Core.setDataAtCell (core.js:1288)
    at Core.emptySelectedCells (core.js:1589)

Steps to reproduce

  1. Create table with some data
  2. Make cell on row 0, column 0 readOnly
  3. Click on Header to select first column (do not click on any cell)
  4. Press Delete

Demo

https://jsfiddle.net/n10vx5cy/1/

Your environment

  • Handsontable version: 7.1.1
  • Browser Name and version: Chrome latest
  • Operating System: MacOS 10.14.6
@AMBudnik
Copy link
Contributor

AMBudnik commented Sep 5, 2019

Thank you for sharing the issue @mbrainiac

It's a regression bug (introduced in v 7.1.1). 7.1.0. works well https://jsfiddle.net/uepwc7sh/ (keeps only the 0, 0 cell.

@AMBudnik AMBudnik added Regression Issues that were created while adding new changes to the source code bug labels Sep 5, 2019
@AMBudnik AMBudnik changed the title Can not clear column when first cell is readOnly [7.1.1+] Can not clear column when first cell is readOnly Sep 5, 2019
@AMBudnik AMBudnik added this to the September 2019 milestone Oct 9, 2019
@aninde
Copy link
Contributor

aninde commented Oct 9, 2019

@mbrainiac this bug will be fixed in 7.1.2 7.2.0 version. In 7.1.2 7.2.0 v. there is no error in console and deleting data by clicking Delete works.

The new version will be released next week.

Result of original reproduction in 7.1.2 7.2.0
Screenshot 2019-10-09 at 14 33 55
Demo:
v. 7.1.2 7.2.0 https://jsfiddle.net/aninde/wys3d04p/

@AMBudnik
Copy link
Contributor

I'm glad to announce that the regression got fixed in 7.2.0. The new version was published today.

@mbrainiac
Please update.

@ChandraAdapa10
Copy link

HI AMBudnik,

we are facing similar kind of issue in 8.3.0 version while merging the two rows for select column,.

Thanks,
Chandra

@AMBudnik
Copy link
Contributor

Hi @ChandraAdapa10 Can you please share a demo and a step-by-step replication scenario?

@ChandraAdapa10
Copy link

HI AMBudnik,

you can find the example here (https://codesandbox.io/s/tags-renderer-and-editor-forked-mju5w?file=/src/app/hello.component.ts ) , in the same code please add below properties in the settings , while trying to merge tags column you will see the issue ( Cannot read property 'removeEventListener' of undefined).
contextMenu:["mergeCells"],
mergeCells:true,

image

Thanks,
Chandra

@AMBudnik
Copy link
Contributor

AMBudnik commented Apr 1, 2021

Thank you for sharing the code @ChandraAdapa10
The error that you get is related to your custom editor

columns: [
      { data: "id", type: "numeric" },
      { data: "name", type: "text" },
      {
        data: "tags",
        renderer: tagsRenderer,
        //editor: TagsEditor,
        //source: tags,
        strict: true
      }

When I comment it out then the issue is not replicable. The error is not related to the issue #6246

@Prasant38
Copy link

Hi AMBudnik, I am also getting this issue .Is there anyway we can get this resolved without commenting the custom editor?
image

@AMBudnik
Copy link
Contributor

Hi @Prasant38 could you please send us code sample and license details at support@handsontable.com?

@Prasant38
Copy link

Hi @Prasant38 could you please send us code sample and license details at support@handsontable.com?

Hello AMBudnic, Its https://codesandbox.io/s/tags-renderer-and-editor-forked-mju5w?file=/src/app/hello.component.ts same as above comment just that as you commented above , is there anyway without commenting custom editor we can fix this
image

@AMBudnik
Copy link
Contributor

Hi @Prasant38 as @adrianszymanski89 mentioned at #10124 - it's related to the implementation. Here https://jsfiddle.net/osz04j3e/ we have a demo with a custom editor and renderer, and we are able to clear the column without any issues (tested with v12.2.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Regression Issues that were created while adding new changes to the source code Status: Released
Projects
None yet
Development

No branches or pull requests

5 participants