New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open collapsed File/Image/CKEditor fields if a file is dragged to them #242

Toutouwai opened this Issue Nov 5, 2018 · 2 comments


None yet
2 participants

Toutouwai commented Nov 5, 2018

Short description of the enhancement

I often set File and Image fields to appear collapsed when empty. But when dragging one or more files/images to them it's annoying when I realise I forgot to open the collapsed field first.

This request is that collapsed File, Image and CKEditor fields open when a file is dragged over them.

How this could be done...

$(document).on('dragenter', '.InputfieldImage.InputfieldStateCollapsed, .InputfieldFile.InputfieldStateCollapsed, .InputfieldCKEditor.InputfieldStateCollapsed', function(e) {
    var dt = e.originalEvent.dataTransfer;
    if(dt.types && (dt.types.indexOf ? dt.types.indexOf('Files') !== -1 : dt.types.contains('Files'))) {
        InputfieldToggle($(this), true);


ryancramerdesign added a commit to processwire/processwire that referenced this issue Nov 8, 2018

Add @Toutouwai processwire/processwire-requests#242 to support automa…
…tic open of collapsed Inputfield when file dragged into file/image or CKEditor field that supports it

This comment has been minimized.


ryancramerdesign commented Nov 8, 2018

@Toutouwai That's a really great idea — I have added this, thanks!


This comment has been minimized.

Toutouwai commented Nov 13, 2018


@Toutouwai Toutouwai closed this Nov 13, 2018

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