Skip to content
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

Chrome 73 mouseup disappear issue #40

Open
warmwhisky opened this issue Mar 18, 2019 · 11 comments
Open

Chrome 73 mouseup disappear issue #40

warmwhisky opened this issue Mar 18, 2019 · 11 comments

Comments

@warmwhisky
Copy link

When clicking the input with mousedown, the clock picker pops up but on mouseup it disappears.

@warmwhisky warmwhisky changed the title Chrome 73 mouseup issue Chrome 73 mouseup disappear issue Mar 18, 2019
@renan-taranto
Copy link

I'm having the same issue @warmwhisky. Did you figure it out how to solve it?

@itsmanuelrc
Copy link

same problem here. Did you find any workaround?

@nullnullru
Copy link

nullnullru commented Mar 28, 2019

The same, has anybody found a fix of the problem?

@warmwhisky
Copy link
Author

I found these guys had the same issue in their docs with there implementation of the clock picker. They have fixed it, but I could not figure out what had been done. mdbootstrap/bootstrap-material-design

@renan-taranto
Copy link

I solved it by using an afterShow function like this:

afterShow: function() {
  setTimeout(() => {
    $(".collectTime .clockpicker").addClass('picker--opened')
    $(".collectTime .clockpicker").show();
  }, 50);
}

It's an ugly workaround but solved the issue. I did it before I found the probably related amsul/pickadate.js#1138 which solved the same issue I had with the pickadate.

@nicomelchiori
Copy link

Same problem here.
Weird thing is that works fine if you use secondary mouse button.

@dinhdu2704
Copy link

The same, Has anyone found a fix the problem?

@nullnullru
Copy link

kaideptrai1102, you can try the renan-teranto's solution, it works but looking not so good :) Anyway it's better than nothing.

@FcoSuastegui
Copy link

FcoSuastegui commented Apr 4, 2019

I found a solution to this problem, adding one more condition to the if () but clicking on the other side of the modality of the datepicker does not close the datepicker, only if the close button is added

if ( ! event.isSimulated && target != ELEMENT && target != document && event.which != 3 **&& event.which != 1** ) {
                // If the target was the holder that covers the screen,
                // keep the element focused to maintain tabindex.
                P.close( target === P.$holder[0] )
            }

@dinhdu2704
Copy link

dinhdu2704 commented Apr 5, 2019

By somehow, I added target.classList.contains('picker__holder' ) to the condition if(), so now I can click outside to close datepicker, it's working perfectly fine :)
if (target.classList.contains('picker__holder') && target != ELEMENT && target != document && event.which !== 3 ) { // If the target was the holder that covers the screen, // keep the element focused to maintain tabindex. P.close( target === P.$root.children()[0] ) }

For clocktime picker,
You have to find this line 0===i.closest(e.popover.find(".picker__wrap")).length&&0===i.closest(e.input).length&&e.hide()
And replace it to 0===i.closest(e.popover.find(".picker__wrap")).length&&0===i.closest(e.input).length&&i[0].classList.contains('picker__holder')&&e.hide()

@vikasthriwe
Copy link

This Is Working For Me...
$('.datepicker').on('mousedown',function(event){
event.preventDefault();
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants