EasyUI Forum
June 24, 2024, 06:34:34 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: ComboTree - Panel problem when scrolling on the outside area  (Read 8013 times)
amir-t
Newbie
*
Posts: 48


View Profile
« on: September 07, 2014, 05:16:23 AM »

Hi,
In case the comboTree contained inside scrollable div, and its panel is opened -
when we move the mouse cursor outside the comboTree's bounds, but inside the scrollable panel's area,
and try to scroll with the mouse wheel, the comboTree panel will move in relation to the scrolling direction instead of being closed.

You can see this problem in the following test:
http://jsfiddle.net/xFy42/23/

Here is the steps in order to reproduce the problem:
1. Open the comboTree panel.
2. Move the mouse cursor outside of the opened panel, but still inside the parent panel area (the blue area).
3. Start moving the mouse wheel in order to scroll the parent panel, and the comboTree's panel will move with it instead being closed. As you can see in the following screenshot:



How can we fix this problem?

Thanks.
« Last Edit: September 07, 2014, 07:52:59 AM by amir-t » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: September 08, 2014, 05:37:41 PM »

Please try to download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4-patch.zip.

Or add the following code to the page.
Code:
<script>
$(function(){
$(document).bind('mousewheel.combo', function(e){
$(e.target).trigger('mousedown.combo');
});
});
</script>

See this updated example http://jsfiddle.net/xFy42/26/.

Logged
amir-t
Newbie
*
Posts: 48


View Profile
« Reply #2 on: September 09, 2014, 06:18:58 AM »

Hi,
Thanks a lot for your fix, the fix is working, but unfortunately, we still have a problem.
The fix works only when the 'comboTree' is already been created when the page is loaded (document ready).
But when trying to create another new dynamic 'comboTree' component on demand,
the creation logics is removing the 'mousewheel' binding for some reason, and the original problem repeats itself.

Please see the following example (you can notice that the fix is working till you try to append new comboTree component):
http://jsfiddle.net/xFy42/29/

Is there a solution for this issue?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: September 09, 2014, 06:30:30 AM »

Please try the code below instead.
Code:
<script>
$(function(){
$(document).bind('mousewheel', function(e){
$(e.target).trigger('mousedown.combo');
});
});
</script>
Logged
amir-t
Newbie
*
Posts: 48


View Profile
« Reply #4 on: September 14, 2014, 02:16:19 AM »

It seems that this fix solved the problem.
thanks!
« Last Edit: September 14, 2014, 02:17:56 AM by amir-t » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!