angular-strap icon indicating copy to clipboard operation
angular-strap copied to clipboard

Timepicker/datepicker disappears when interacting on Windows 8 + Chrome

Open derekmu opened this issue 12 years ago • 20 comments

I've tested under Windows 7 and Windows 8, with Firefox and Chrome. The issue only seems to occur under Windows 8 with Chrome... If I have a datepicker or a timepicker directive, when I open the popup box and try to interact with something in the box, it disappears. This is problematic especially when, for example, the user wants to click up or down on the timepicker arrows in order to pick a time earlier or later.

You can use this plunker to test: http://plnkr.co/edit/eLnbzGgVN3aeSsZHpXPu?p=preview

I've identified the issue on 2 computers so I don't think it's something about my setup.

derekmu avatar Apr 16 '14 16:04 derekmu

+1 I have the same problem in my computer, this my config;.

AngularJS Version 1.2.6 Angular-Strap Version 2.0.1 Windows 8.1 Google Chrome Version 34.0.1847.116 m

nancoder avatar Apr 18 '14 00:04 nancoder

I have a similar issue. AngularJS 1.2.16 Angular-Strap 2.0.1 Windows 8.1 Chrome 34 markup:

The input field appears 'disabled'. The user can select a year from the popup, but the month-select does not appear and no date is selected.

kpgarrod avatar Apr 21 '14 12:04 kpgarrod

kpgarrods comment about the input field being disabled shed some light on this for me... Chrome browser has the createTouch method defined in window.document, which a few components in angular-strap are using to detect touch devices? I don't know if it's a windows 8 thing, but my windows 8 laptop does have a touch screen (although I never use the touch screen and I'm usually looking at 2 non-touch screen monitors).

I guess that it is detected and the input element set to readonly so that the on screen keyboard doesn't pop up and block the user from seeing the datepicker popup on typically small screen touch devices.

derekmu avatar Apr 21 '14 16:04 derekmu

I just confirmed that my user (fortunately a designer) is using a touch screen.

kpgarrod avatar Apr 22 '14 11:04 kpgarrod

Datepicker is basically unusable on Windows 8 touch devices like Yoga 2 on chrome. Field is read only and popup calendar disappears after each click, so it is not possible to change month / year.

The problem seems to be only in Chrome, it works fine in IE and Firefox

My hotfix for now is disabling touch support on non "native" devices like this:

datepicker.js: var isTouch = 'createTouch' in $window.document; var isNative = /(ip(a|o)d|iphone|android)/ig.test($window.navigator.userAgent); isTouch &= isNative;

xbrabec avatar May 19 '14 20:05 xbrabec

That was basically my fix as well. It seems that on Firefox for Android, with or without isTouch=true, the datepicker isn't very clean, chrome on android it seems to work well enough, and I didn't test anything else.

That change only fixes it if you don't want support for mobile web access on your pages. I'm only targeting desktop and I'm not an expert on mobile web support.

derekmu avatar May 19 '14 21:05 derekmu

Has anyone experienced the same issues on Multiselect as well? I have an issue here on #848. Looks like this is the same problem. I´m using a lenovo Yoga with Touch, could remove the Problem with adding line mentioned above: isTouch &= isNative;

GGrossberger avatar Jun 20 '14 13:06 GGrossberger

I'm getting this too Windows 8.1 Google Chrome stable, doesn't happen in mac

amcdnl avatar Jun 30 '14 15:06 amcdnl

This line seems to be the issue on chrome and windows 8.

https://github.com/mgcrea/angular-strap/blob/master/dist/angular-strap.js#L730

Why is it making it read only if touch is available????

ocomsoft avatar Jul 01 '14 10:07 ocomsoft

Same issue. Not able to interact with widget for more than one click, and has the html markup readonly="readonly". Windows 7 Chrome 36.0.1985.125 Angular 1.2.18 + cookies + cache + animate + route + touch.

k-funk avatar Jul 29 '14 21:07 k-funk

Does this fix it: https://github.com/mgcrea/angular-strap/pull/808 ?

I can reproduce it on Chrome inside a VmWare Windows 8.1 virtual machine without a touch screen.

daviddutch avatar Aug 04 '14 09:08 daviddutch

@daviddutch , able to create a new dst .js and upload it to a new plunkr forked from this one? http://plnkr.co/edit/eLnbzGgVN3aeSsZHpXPu?p=preview

k-funk avatar Aug 05 '14 02:08 k-funk

@k-funk I've made this: http://plnkr.co/edit/ZB7fnu3q90KiKMoYxCGI?p=preview

It's better but the click on buttons seems to act weird... For example when I click on the next month button it seems like it fires the event twice.

daviddutch avatar Aug 05 '14 14:08 daviddutch

Could someone on windows8.1 tell me if the ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch is returning true on latest chrome?

mgcrea avatar Aug 07 '14 15:08 mgcrea

When you have a touch screen yes it returns true. Haven't tried without one.

daviddutch avatar Aug 07 '14 15:08 daviddutch

Confirmed on Win8.1 Chrome 36.0.1985.125 m with touchscreen. More specifically, 'ontouchstart' in window is true, window.DocumentTouch is undefined. Will test on non-touchscreen later.

anthonychu avatar Aug 07 '14 15:08 anthonychu

@Afrosatan , fixed for me. Fixed for you? broken: http://plnkr.co/edit/OvVzjVmEFpkczHH3g04d?p=preview fixed: http://plnkr.co/edit/EQfFzWCR2lUg4XeR6LWZ?p=preview (plunkr has angular-strap versions embedded in plunkr files so it might take a while to load)

k-funk avatar Aug 08 '14 22:08 k-funk

Works for me.

Note - the 2 versions you linked have an odd bug/difference in behavior in the 'fixed' version and I don't know if it's because of the changes or because of other changes made between versions. Due to the nature of the bug, I suppose it is other changes...

In the 'fixed' version: Using the time picker 'Time (as date)', or the timepicker for the datetime picker: 1.) go to 12:XX (AM or PM) 2.) open the picker and start changing the minute by clicking one of the numbered boxes For me it alternates between AM and PM despite just changing the minute from, for example, 12:45 to 12:50. Also, the AM/PM buttons do not work at all if the hour is 12:XX.

I have tested this on windows 8 on Firefox and Chrome, and windows 7 on Firefox, Chrome and Internet Explorer and they all exhibit the same bug. I haven't investigated the cause of the issue...If you believe it isn't related to the changes for this issue, feel free to make another issue, or check if it's been reported already.

Thanks for your help!

derekmu avatar Aug 08 '14 23:08 derekmu

Confirmed. I think this is a new bug. Making a ticket.

k-funk avatar Aug 08 '14 23:08 k-funk

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 26 '19 19:01 lock[bot]