Support » Fixing WordPress » How Do I – Media Library multiple image selection (Touch/Checkbox)

  • Hello all!

    Part of the code I use is as so:

    var file_frame = wp.media.frame = wp.media({
            frame: "post",
            state: "featured-gallery",
            library : { type : 'image'},
            button: {text: "Edit Image Order"},
            multiple: true,
        });
    
        file_frame.states.add([
            new wp.media.controller.Library({
                id:         'featured-gallery',
                title:      'Select Images for Gallery',
                priority:   20,
                toolbar:    'main-gallery',
                filterable: 'uploaded',
                library:    wp.media.query( file_frame.options.library ),
                multiple:   file_frame.options.multiple ? 'reset' : false,
                editable:   true,
                allowLocalEdits: true,
                displaySettings: true,
                displayUserSettings: true
            }),
        ]);

    Essentially I am making a plugin for a gallery however it needs to work on mobile as well. Currently holding CTRL/Shift works for selecting multiple images but I need this to work for Mobile users, anybody on phones or touch devices.

    Is there any way to change it so that it’s on touch and not just on click? The way the world is going nowadays I’m surprised touch isn’t automatically there.

    I’ve been searching everywhere for the answer to this, I know it should be something simple but it eludes me.

    Any help for this would be greatly appreciated.

Viewing 1 replies (of 1 total)
  • So essentially what I want is my media library to always have a checkbox for multiple selection, or somehow just allow left clicking once to toggle the selection.

    I’d mainly like Touch users to be able to upload multiple, already got ctrl+click working.

    Anybody?

Viewing 1 replies (of 1 total)
  • The topic ‘How Do I – Media Library multiple image selection (Touch/Checkbox)’ is closed to new replies.