impossible to make non-modal non-draggable

Created on 20 January 2016, almost 9 years ago
Updated 24 November 2023, about 1 year ago

Hi. After (finally) figuring out how to make a non-modal dialog, I realized that for some reason I can make it non-resizable, but I cannot make it non-draggable.

STEPS TO REPRODUCE:
- Create an tag with ' data-dialog-options=\'{"modal":0, "target":"#some-nonmodal-id", "autoResize": 0, "resizable": 0, "draggable": 0 }\' '

EXPECTED BEHAVIOR:
Dialog is not resizable or movable

HOWEVER:
Dialog is movable, but not resizable

This appears to actually be an upstream dialog issue, because when I hack dialog to show the dialog options just before showing it I get:

{
autoOpen: true
autoResize: "0"
buttonClass: "button"
buttonPrimaryClass: "button--primary"
buttons: Array[0]
close: (event)
dialogClass: ""
draggable: "0"
drupalAutoButtons: true
maxHeight: "95%"
modal: false
position: Object
resizable: "0"
target: "#some-nonmodal-id"
title: "Welcome"
width: "90%"
}

Notice that somewhere along the way, the 0's came back stringified. This appears to not affect autoResize or resizable, but it DOES affect draggable. When I hack line 66 of "js/dialog/dialog.js" and set draggable to (boolean) false, the dialog is undraggable as expected.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States captainack

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024