mcasimir / mobile-angular-ui

Angular.js Mobile UI Framework with Bootstrap 3
http://mobileangularui.com/
MIT License
2.87k stars 709 forks source link

Mouse drag and selection problem in "<textarea>" <-- ng-swipe-right='Ui.turnOn("uiSidebarLeft")' #208

Open biplanechoi opened 9 years ago

biplanechoi commented 9 years ago

Thanks for your great job!!!

In Chrome browser(for PC Ver. 39.0.2171.99 m), when I drag mouse left or right and want to select text in "textarea" tag or "div contenteditable" tag, lt's not good working. And I can see '?uiSidebarLeft' in the URL bar, like "#/biplane/3?uiSidebarLeft".

It's a serious problem to my webapp. Please help me.

Always thanks.

Have a nice day.

mcasimir commented 9 years ago

Hi! This issue is yet solved in master branch, when I'll release I strongly encourage you to update, cause it contains a lot of important fixes and a better gesture handling system.

I've to solve some issues before release it. Anyway as a quick fix I suggest you to what follows:

var dontPropagate = function(e){
e.stopPropagation();
};

textarea.on('focus', function(){  
   textarea.on('touchend mouseup', dontPropagate);
});

textarea.on('blur', function(){  
   textarea.off('touchend mouseup', dontPropagate);
});
biplanechoi commented 9 years ago

Many thanks for your answer!! It's very helpful answer to me! And I'll always look forward to next update! ^^ Thanks for your great work and kind answer again!