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
{{ message }}
Repository navigation
[EuiDraggable] Dragging doesnt work for EuiAccordion draggable on mobile with disableInteractiveElementBlocking #5903
If EuiDraggable is used with an EuiAccordion child, using the button of an accordion as drag handle (which requires to set disableInteractiveElementBlocking), then the drag is aborted right after it starts on touch devices.
I am unable to reproduce the issue in the latest chrome (v103.0.5060.53) with the provided codesandbox. Tried both mac & windows with various screen sizes emulated in both horizontal & vertical orientations.
Joe figured out the repro requirement - viewing the deployed code sandbox with responsive+ipad mini enabled, at 75% zoom.
Was able to reproduce by moving the accordion example into EUI docs and viewing with the same env as above, react-beautiful-dnd's operation is being interrupted by a global error: ResizeObserver loop limit exceeded 🤦♂️
First thought was to patch react-beautiful-dnd's ErrorBoundary component's onWindowError handler, but their transpilation step converts that code to the old pseudo-classes style:
function ErrorBoundary() {
var _this;
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
_this.onWindowError = function (event) {
closing over _this and preventing any access, unless we also patched relevant parts of react to intercept element creation 😅
So I'm left with three ideas, will discuss at the team's sync meeting tomorrow
Because the error boundary code adds a global event handler on windowon mount, we can beat it by adding our own window error handler that stopsImmediatePropagation for ResizeObserver loop limit exceeded errors. I have tested this as a util method an app could call once at startup:
export function patchResizeObserverLoopLimitExceeded() {
window.addEventListener('error', (e) => {
if (e.message.includes('ResizeObserver loop limit exceeded')) {
e.stopImmediatePropagation();
}
});
}
Deactivate EUI's resize observers when a drag operation is started. This could be done automatically by attaching global event handlers or by exposing pause/unpause utility methods for EUI components & applications to use.
Intercept react-beautiful-dnd's event listener when it's added to window and don't call it for resize loop errors
Activity
chandlerprall commentedon Jun 22, 2022
I am unable to reproduce the issue in the latest chrome (v103.0.5060.53) with the provided codesandbox. Tried both mac & windows with various screen sizes emulated in both horizontal & vertical orientations.
chandlerprall commentedon Jun 27, 2022
Joe figured out the repro requirement - viewing the deployed code sandbox with responsive+ipad mini enabled, at 75% zoom.
Was able to reproduce by moving the accordion example into EUI docs and viewing with the same env as above, react-beautiful-dnd's operation is being interrupted by a global error:
ResizeObserver loop limit exceeded🤦♂️Should be a fun one.
chandlerprall commentedon Jun 27, 2022
First thought was to patch react-beautiful-dnd's ErrorBoundary component's
onWindowErrorhandler, but their transpilation step converts that code to the old pseudo-classes style:closing over
_thisand preventing any access, unless we also patched relevant parts of react to intercept element creation 😅So I'm left with three ideas, will discuss at the team's sync meeting tomorrow
windowon mount, we can beat it by adding our own window error handler that stopsImmediatePropagation forResizeObserver loop limit exceedederrors. I have tested this as a util method an app could call once at startup:Deactivate EUI's resize observers when a drag operation is started. This could be done automatically by attaching global event handlers or by exposing pause/unpause utility methods for EUI components & applications to use.
Intercept react-beautiful-dnd's event listener when it's added to window and don't call it for resize loop errors
chandlerprall commentedon Jul 5, 2022
Forgot to follow up after last week's sync: I'm exploring two ideas for handling this in the eui drag&drop component(s).