brrd / electron-tabs

Tab component for Electron
MIT License
697 stars 130 forks source link

Not loading js file #191

Open notallowedbro opened 1 year ago

notallowedbro commented 1 year ago

Subject: Issue with JavaScript files not functioning correctly when creating new tabs using electron-tabs

Description: I am facing a critical issue while utilizing the electron-tabs package to manage tabs within my Electron application. When programmatically creating a new tab, the associated JavaScript file fails to execute properly, causing unexpected behavior. The problem seems to lie in the interaction between the tab creation process and the loading/execution of the JavaScript file.

Steps to Reproduce:

Open the Electron application. Navigate to the tab management section. Programmatically create a new tab using the electron-tabs package. Observe that the JavaScript functionalities related to the newly created tab are not working as intended. Expected Behavior: Upon creating a new tab, the JavaScript file associated with the respective HTML file should execute correctly, enabling the expected functionalities and behaviors within the tab.

Actual Behavior: Upon creating a new tab, the JavaScript file does not seem to load or function correctly. Consequently, essential functionalities are missing or malfunctioning within the newly created tab.

Code Snippets: The code responsible for creating the new tab and loading the associated JavaScript file is as follows:

// Code for creating a new tab const tabs = require('electron-tabs'); const tabGroup = new tabs.TabGroup();

const newTab = tabGroup.addTab({ title: 'New Tab', src: 'path/to/html/file.html', });

// The JavaScript file associated with 'path/to/html/file.html' does not function as expected.

Possible Solution: At this point, I'm unsure of the exact cause of the issue. However, it might be worth investigating the tab creation process within the electron-tabs package and how it interacts with the JavaScript file loading mechanism. It's possible that there might be a timing issue or an event not triggering as expected.

Please let me know if you require any further information or assistance in resolving this bug. Your prompt attention to this matter is greatly appreciated. Thank you!

m1m6 commented 1 year ago

Same issue here

brrd commented 1 year ago

We can't help you unless you give some precise code sample where we can see the actual file tree, in a separate repo for example. I also need to know you OS and the electron version.

xuakson commented 1 year ago

me too , didnt work for me, using electron version v26.3.0,