We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Uncaught TypeError: Cannot read property 'querySelector' of undefined

Thread ID:

Created:

Updated:

Platform:

Replies:

148494 Oct 22,2019 02:18 PM UTC Aug 10,2020 04:40 PM UTC React - EJ 2 9
loading
Tags: DocumentEditor
sercanboyraz
Asked On October 23, 2019 06:58 AM UTC

Hi,
Syncfusion React DropDownButton component constantly is error.What can be the reason?
Any advice much appreciated.


Full Error,

Uncaught TypeError: Cannot read property 'querySelector' of undefined
    at DropDownButton.removeCustomSelection (drop-down-button.js:401)
    at Observer. (drop-down-button.js:558)
    at Observer.notify (observer.js:109)
    at DropDownButton.Base.trigger (base.js:184)
    at DropDownButton.closePopup (drop-down-button.js:554)
    at DropDownButton.mousedownHandler (drop-down-button.js:462)
DropDownButton.removeCustomSelection @ drop-down-button.js:401
(anonymous) @ drop-down-button.js:558
Observer.notify @ observer.js:109
Base.trigger @ base.js:184
DropDownButton.closePopup @ drop-down-button.js:554
DropDownButton.mousedownHandler @ drop-down-button.js:462




Saranya Dhayalan [Syncfusion]
Replied On October 23, 2019 02:22 PM UTC

Hi Sercan, 
 
Thank you for contacting Syncfusion support. 
 
We have checked the reported issue and this issue is not replicated in our end. In drop down button component, removeCustomSelection operation is properly working in our end.  
 
We have created the sample for your reported issue please refer to the below link. 
 
 
Could you please check the above sample and get back to us if you need further assistance on this? 
 
Regards, 
Saranya D 


Yogesh Patil
Replied On July 29, 2020 09:50 AM UTC

I am having same error for TreeGrid component using Angular 8.

Padmavathy Kamalanathan [Syncfusion]
Replied On July 30, 2020 01:14 PM UTC

Hi Yogesh, 

 
Greetings from Syncfusion Support. 

 
QUERY: ERROR TypeError: Cannot read property 'querySelectorAll' of null 

 
We have checked your reported problem by preparing sample but we are unable to reproduce the issue at our end. For your convenience we have created the sample, refer to the below link.  
The reported issue may occur when the edit form is undefined or null. So, please share the following details. 
 
  1. Complete Tree grid code example.
  2. If possible, reproduce the reported issue in the shared sample Or share the issue reproducible sample.
  3. Video demonstrating on the issue.
 
The provided information will be helpful to provide you response as early as possible. 
  
Regards, 
Padmavathy Kamalanathan 


Steven Ferguson
Replied On August 4, 2020 12:36 PM UTC

Hi

I have found a way to reproduce this problem.

1) Create a DocumentEditorContainerComponent
2) Use the toolbarItems property on the container and add Images and/or Break (which contain a DropDownButton)
3) Destroy the DocumentEditorContainerComponent
4) When you make a mousedown anywhere on the page you get this error :

drop-down-button.js?e7e7:397 Uncaught TypeError: Cannot read property 'querySelector' of undefined
    at DropDownButton.removeCustomSelection (drop-down-button.js?e7e7:397)
    at Observer.eval (drop-down-button.js?e7e7:504)
    at Observer.notify (observer.js?811a:84)
    at DropDownButton.Base.trigger (base.js?3923:181)
    at DropDownButton.closePopup (drop-down-button.js?e7e7:501)
    at DropDownButton.mousedownHandler (drop-down-button.js?e7e7:444)

Harini Chellappa [Syncfusion]
Replied On August 5, 2020 02:29 PM UTC

Hi Steven, 

We couldn’t reproduce the reported scenario. Kindly check the below stackblitz sample and modify the same sample to reproduce the reported scenario in our end. It will be helpful for us to provide solution at the earliest. 


Regards, 

Harini C 


Steven Ferguson
Replied On August 5, 2020 03:44 PM UTC

Hi Harini,

You can reproduce with this stackblitz sample https://stackblitz.com/edit/react-5q3sns-yozc36

1) click on the close button under the document editor
2) click anywhere on the page

After you can even try to do any modification in the code to make the page Hot Reload and after the document editor is displayed wherever you click on the page you'll get the error.

It look like there is a listener onMouseDown not being removed when removing the document editor from the page. 

Chieh Lin Lu
Replied On August 6, 2020 06:52 AM UTC

I have the same problem in React Document Editor.  Please fix it as soon as you can !!

Harini Chellappa [Syncfusion]
Replied On August 6, 2020 04:37 PM UTC

Hi Steven/Chieh, 

Currently, we are checking on this. Will update further details by Aug 10th, 2020. 

Regards, 

Harini C  


Harini Chellappa [Syncfusion]
Replied On August 10, 2020 04:40 PM UTC

Hi All, 

We have considered the reported scenario as bug and logged defect report. Fix will be included in our upcoming EJ2 patch release which is tentatively scheduled on Aug 26th, 2020. Once included, will update you. You can also track the bug fix status from below link. 


Regards, 

Harini C 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon