Выберите меню, не открывающееся при нажатии после отправки формы только в Firefox - PullRequest
0 голосов
/ 20 июня 2020

Мой выбор после отправки формы имеет странное поведение.

он не остается открытым при щелчке, поэтому с помощью мыши невозможно сделать новый выбор.

Это происходит только в Firefox и это единственный браузер, который сохраняет стиль при открытом выборе.

Моя скрипка: https://jsfiddle.net/v9nf15g0/

$ = jQuery;
$( document ).ready(function() {
$('#inviadomanda').on('click', function (e) {
// console.log(this.id);
e.preventDefault();
rel = $('#relatore').children("option:selected").val();
ques = $('#domanda').val();
nome = $('#partecipante').val();
$.ajax({
  url: 'https://test.prova.it/questions/write.php',
  type: 'GET',
  data: { partecipante : nome, domanda : ques, relatore : rel},
    success: function (response) {
      console.log('response received: ' + response);
      $('#message_success').fadeIn();
      $('.at-about-fab__meta').hide();
      $('.at-about-fab').css({'width' : '310'});
      //$(".at-about-fab").hover(function() {
                //$(this).css("right","20px")
                //});
    },
    error: function (response) {
      console.log('ajax failed');
      $('#message_error').show();
    },
    });
});

$('.close').on('click', function(e) {

$('.at-about-fab').css({'width' : 'initial'});
$('.at-about-fab').css({'transform' : 'translateX(98.2%)'});
$('#message_success').fadeOut('slow', function() { $('.at-about-fab__meta').fadeIn();});
$('#message_error').fadeOut();
$('#domanda').val('');
$('#partecipante').val('');
$('.at-about-fab').on('mouseleave', function() { $('.at-about-fab').css({'transform' : ''});    $('#partecipante').focus();});
})
});

Попробуйте отправить форму и после удаления сообщения об ошибке вы можете протестировать Firefox, выбор больше не работает.

Любая ошибка или обходной путь для решения проблемы?

...