Comment 'https://github.com/u...' to 'BUG: Image drag on Android'
  • https://github.com/unacms/una/issues/4707

    The issue is now marked closed, with fixes that have bugs. I will provide the changes necessary for it to work across all touch devices.

    In the github fix, BxDolUploader.js line 1113 is

    if (window.innerWidth <= 800){
    

    This is a horrible way to turn on touch events. It fails on my tablet, and any of my phones in landscape. It should be:

    if (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)) {
    

    This will enable it on ANY modern touch device.

    BUG:

    When saving the position. The overflow is not reset, so after save the page is left immoveable. You need to add line 1145:

    BxDolImageTweak.prototype.savePosition = function (){
      var $this = this;
      $('body').css('overflow', '')
    

    So scroll is reactivated.

    Line 1148 needs unbind added:

    $(".bx-image-edit-source-" + $this._sUniqueId).addClass('bx-image-edit-move').unbind('dragover').unbind('touchmove'); 
    

    Thank you for the initial fix, however the above fixes all issues.

    @LeonidS @Alex T⚜️ @Anton L -- couldn't find Roman, someone please add these to the github codebase so on next update the fixes all work. Thank you!