You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my application, I am using WalkMe alongside react-resizable-panels. However, I’ve encountered an issue where react-resizable-panels injects a <style> element into the DOM through the utility functions in its codebase. This behavior disrupts the flow of my application, specifically affecting WalkMe's functionality.
The problem originates in the setGlobalCursorStyle function within react-resizable-panels, where a <style> tag is dynamically created and appended to the . This tag sets a global cursor style (*{cursor: ${style}!important;}), which is interfering with other elements on the page.
export function setGlobalCursorStyle(
state: CursorState,
constraintFlags: number
) {
if (!enabled) {
return;
}
const style = getCursorStyle(state, constraintFlags);
if (currentCursorStyle === style) {
return;
}
currentCursorStyle = style;
if (styleElement === null) {
styleElement = document.createElement("style");
const nonce = getNonce();
if (nonce) {
styleElement.setAttribute("nonce", nonce);
}
document.head.appendChild(styleElement);
}
styleElement.innerHTML = `*{cursor: ${style}!important;}`;
}
Steps to Reproduce
Use react-resizable-panels in an application that also integrates WalkMe.
Interact with react-resizable-panels to trigger the injection of the <style> element.
Observe that the injected styles interfere with WalkMe's DOM flow and functionality.
Expected Behavior
react-resizable-panels should avoid globally injecting styles or provide a way to disable this behavior to prevent conflicts with other libraries like WalkMe.
Additional Notes
If there is an existing way to prevent this issue (e.g., disabling the global cursor styles or using a workaround), please advise. Otherwise, a fix or an enhancement to provide better control over this behavior would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
In my application, I am using WalkMe alongside react-resizable-panels. However, I’ve encountered an issue where react-resizable-panels injects a <style> element into the DOM through the utility functions in its codebase. This behavior disrupts the flow of my application, specifically affecting WalkMe's functionality.
The problem originates in the setGlobalCursorStyle function within react-resizable-panels, where a <style> tag is dynamically created and appended to the . This tag sets a global cursor style (*{cursor: ${style}!important;}), which is interfering with other elements on the page.
Code Reference
The issue lies in the following utility:
cursor.ts
packages/react-resizable-panels/src/utils/cursor.ts
Steps to Reproduce
Use react-resizable-panels in an application that also integrates WalkMe.
Interact with react-resizable-panels to trigger the injection of the <style> element.
Observe that the injected styles interfere with WalkMe's DOM flow and functionality.
Expected Behavior
react-resizable-panels should avoid globally injecting styles or provide a way to disable this behavior to prevent conflicts with other libraries like WalkMe.
Additional Notes
If there is an existing way to prevent this issue (e.g., disabling the global cursor styles or using a workaround), please advise. Otherwise, a fix or an enhancement to provide better control over this behavior would be greatly appreciated.
The text was updated successfully, but these errors were encountered: