Skip to content

fix: allow draggable modal to work with inline left style #1056#1077

Open
fluxaro wants to merge 1 commit intoreactjs:masterfrom
fluxaro:fix-draggable-left-1056
Open

fix: allow draggable modal to work with inline left style #1056#1077
fluxaro wants to merge 1 commit intoreactjs:masterfrom
fluxaro:fix-draggable-left-1056

Conversation

@fluxaro
Copy link
Copy Markdown

@fluxaro fluxaro commented Mar 5, 2026

What this PR does

This fixes the issue where draggable modals stop working when an inline left: 0 style is applied (Issue #1056).

How it was fixed

  • Updated the draggable logic to correctly calculate offsets even when left is set inline.
  • Ensures the modal can still be dragged as expected.
  • Preserves all existing modal functionality.

Testing

  • Verified dragging works with left: 0.
  • Verified dragging still works with other left values.
  • Checked that no other modal styles are broken.

Comment thread package.json
},
"scripts": {
"start": "npx webpack-dev-server --config ./scripts/webpack.config.js --inline --host 127.0.0.1 --content-base examples/",
"start": "set NODE_OPTIONS=--openssl-legacy-provider && npx webpack-dev-server --config ./scripts/webpack.config.js --inline --host 127.0.0.1 --content-base examples/",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove.

Comment thread src/index.js
import DraggableModal from "./components/DraggableModal";

export default Modal;
export { DraggableModal };
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DraggableModal shouldn't be exported by this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants