cubiclesoft / js-fileexplorer

A zero dependencies, customizable, pure Javascript widget for navigating, managing, uploading, and downloading files and folders or other hierarchical object structures on any modern web browser.
256 stars 42 forks source link

Doesn't open folders on iOS #14

Closed mrkacg1 closed 2 years ago

mrkacg1 commented 2 years ago

Right clicking locks the selection. Right click again and it unlocks.

cubiclesoft commented 2 years ago

Right-click is supposed to show the browser's right-click cut/copy/paste menu. What browser and OS and versions of both are you using?

Also, please specify more details.

mrkacg1 commented 2 years ago

Windows 10, Chrome. Is there a way to see an example of the menu on right click?

cubiclesoft commented 2 years ago

What version of Chrome?

mrkacg1 commented 2 years ago

100 - Firefox 99. On iPad you can't open folders with the touch (Chrome, Safari) any version

cubiclesoft commented 2 years ago

I'm unable to replicate this in any browser on the Live Demo.

Check your Javascript console for errors.

mrkacg1 commented 2 years ago

Ok, I have managed to find the problem. The right click menu now works. Now, I can't open folders from ipad. Any suggestion?

cubiclesoft commented 2 years ago

The only Apple hardware at my disposal is a 2014 Mac Mini "running" Monterey. (Running is in quotes because the system takes several minutes to do anything ever since updating to Monterey.) I primarily run Windows desktop and Linux server.

https://www.browserstack.com/guide/how-to-debug-on-iphone

mrkacg1 commented 2 years ago

Okay. I will review and report

mrkacg1 commented 2 years ago

It only happens on iPad and iPhone:

Send sample video: http://u.pc.cd/DIvrtalK

Console error: frame loading interrupted

cubiclesoft commented 2 years ago

Does the JS File Explorer live demo work? The demo is the gold standard for verifying most JS File Explorer functionality.

Other than that, I have no idea and you'll have to dig into this one as well. Apple's WebView implementation for Safari lags behind all the other browsers out there and has a ton of bugs in it. Safari is the new IE6. Since you are using PHP File Manager and not standalone JS File Explorer, that means the Javascript wrapper code for PHP File Manager might be interfering with something specifically within Safari on iOS. But I have no idea what it could be and I don't have a way to test it either at the moment.

mrkacg1 commented 2 years ago

Hello. It doesn't work in chrome on iOS. I did the test with the demo and it does not open the folders. It's like it doesn't catch the open on touch event. The issue is that it is something in iOS apparently, since I have tried with several browsers (Firefox, Chrome, Safari) and none open a folder.

Link video: (https://u.pcloud.link/publink/show?code=XZmLHpVZF5uISQfHAGLw7neFtt6YxpDqTNjV)

cubiclesoft commented 2 years ago

Using a borrowed iPad, I have been able to replicate this issue on iOS. Debugging it is another thing altogether. No idea why double-click isn't working.

cubiclesoft commented 2 years ago

This has now been fixed. Please update to the latest version.

Looks like WebKit on iOS is broken. Had to emulate double-click handling by looking at the event timestamp rather than the "detail" attribute of the event object. It's a little wonky/not as responsive as I'd prefer. However, it kind of works now even if it isn't perfect.

Also notably, half of the demo page and/or the widget sometimes fails to load altogether on iOS. No idea why that happens and it happens randomly.

mrkacg1 commented 2 years ago

Thanks! It works very well.