wp-shortcake / shortcake

Shortcake makes using WordPress shortcodes a piece of cake.
GNU General Public License v2.0
665 stars 143 forks source link

Problem with select2 multiple-select on Safari #753

Open tmconnect opened 7 years ago

tmconnect commented 7 years ago

On Safari (10.1.1) the post_select field doesn't work correctly. Entering the field drops down the notice "Please enter 1 or more characters" but I'm not able to enter anything.

Tested with Chrome it works as expected.

Any ideas?

szepeviktor commented 7 years ago

Does https://select2.github.io/examples.html work?

tmconnect commented 7 years ago

Yes and other select2 fields (e.g. from ACF) working as well.

But it is no conflict with other plugins. Tried it with only Shortcode UI 0.7.2 activated.

szepeviktor commented 7 years ago

define( ‘SELECT2_NOCONFLICT’, true ); ?

tmconnect commented 7 years ago

Excuse me, I could have mentioned - yes it's set

szepeviktor commented 7 years ago

Possible browser console messages?

tmconnect commented 7 years ago

No, nothing. No console messages, no debug messages...

szepeviktor commented 7 years ago

Could you inspect the event on the Select2 drop-down?

select2-event

tmconnect commented 7 years ago

Sure, but I see that I got some click events that I don't see on you screenshot. And I see that you use a single-select field and I'm a multiple-select field.

firefox_screen_001

I tested the single-select and it worked. But the multiple-select doesn't.

nicoladj77 commented 7 years ago

I have an issue when I have multiple select2 for Posts select on chrome. @tmconnect is the same issue you are mentioning? image

tmconnect commented 7 years ago

@nicoladj77 No, I have only one select field that is set to select multiple posts and I can't input any text in the search field.

scheurta commented 6 years ago

The issue (for me) is that the select2 input field select2-search__field has an inline style with width: 0px;. The issue disappears when I set a min-width for that input field in the .edit-shortcode-form

Example code:

add_action( 'admin_head', function() {
    ?>
    <style>
        .edit-shortcode-form input.select2-search__field {
            min-width: 50px;
        }
    </style>
    <?php
});

I'm using version 0.7.2, I'm not sure if this is fixed in 0.7.3.

pySilver commented 6 years ago

@nicoladj77 thats an issue with css:

// Select2 Fix
.edit-shortcode-form .select2-container {
  z-index: auto;
}