0.8 - Internal Window drag not ending when mouse leaves document

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

0.8 - Internal Window drag not ending when mouse leaves document

WillP-2

When an internal window is dragged and the mouse moves outside the document
area (and even outside the browser frame) the drag is not terminated and if
a mouse up happens outside the web page the window drag continues when the
mouse returns inside the document area - this is not ideal behaviour.

I don't know enough about the browsers to know if there is a mouse/drag
exit/leave/out event which could be used to fix this but it would be good to
know if it is possible for this behaviour to be corrected.

Thanks,

Will.
--
View this message in context: http://www.nabble.com/0.8---Internal-Window-drag-not-ending-when-mouse-leaves-document-tp21092362p21092362.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: 0.8 - Internal Window drag not ending when mouse leaves document

WillP-2

Update: this does not seem to be a problem with Opera but is does happen in
Firefox 3.0.5 and IE 6.0


WillP wrote:

>
> When an internal window is dragged and the mouse moves outside the
> document area (and even outside the browser frame) the drag is not
> terminated and if a mouse up happens outside the web page the window drag
> continues when the mouse returns inside the document area - this is not
> ideal behaviour.
>
> I don't know enough about the browsers to know if there is a mouse/drag
> exit/leave/out event which could be used to fix this but it would be good
> to know if it is possible for this behaviour to be corrected.
>
> Thanks,
>
> Will.
>

--
View this message in context: http://www.nabble.com/0.8---Internal-Window-drag-not-ending-when-mouse-leaves-document-tp21092362p21092469.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: 0.8 - Internal Window drag not ending when mouse leaves document

Petr Kobalíček
Hi WillP,

qooxdoo developers will be probably not active in december, but I
think that this is for bug report. For example ExtJS have no problem
with this in firefox, so I think it should be fixed in qooxdoo.

Cheers
- Petr

2008/12/19 WillP <[hidden email]>:

>
> Update: this does not seem to be a problem with Opera but is does happen in
> Firefox 3.0.5 and IE 6.0
>
>
> WillP wrote:
>>
>> When an internal window is dragged and the mouse moves outside the
>> document area (and even outside the browser frame) the drag is not
>> terminated and if a mouse up happens outside the web page the window drag
>> continues when the mouse returns inside the document area - this is not
>> ideal behaviour.
>>
>> I don't know enough about the browsers to know if there is a mouse/drag
>> exit/leave/out event which could be used to fix this but it would be good
>> to know if it is possible for this behaviour to be corrected.
>>
>> Thanks,
>>
>> Will.
>>
>
> --
> View this message in context: http://www.nabble.com/0.8---Internal-Window-drag-not-ending-when-mouse-leaves-document-tp21092362p21092469.html
> Sent from the qooxdoo-devel mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>

------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: 0.8 - Internal Window drag not ending when mouse leaves document

Alexander Back
In reply to this post by WillP-2
Hi Will,

WillP wrote:

> Update: this does not seem to be a problem with Opera but is does happen in
> Firefox 3.0.5 and IE 6.0
>
>
> WillP wrote:
>> When an internal window is dragged and the mouse moves outside the
>> document area (and even outside the browser frame) the drag is not
>> terminated and if a mouse up happens outside the web page the window drag
>> continues when the mouse returns inside the document area - this is not
>> ideal behaviour.
>>
>> I don't know enough about the browsers to know if there is a mouse/drag
>> exit/leave/out event which could be used to fix this but it would be good
>> to know if it is possible for this behaviour to be corrected.
Unfortunately not. There is no event fired for IE and Firefox when the
mouse pointer moves outside the browser, so you cannot easily stop the
drag session.
You can use the "mouseout" event at the window object, but this still
does not solve the problem completely. If the user moves out *and* holds
the mouse button the drag session should be still valid. Or you choose
to stop the drag session whenever the user leaves the window.
Anyway, there is no clean solution to this problem and this is the
reason for no implementation in the framework. Hopefully there will be
some useful events in all browsers in the future to handle this issue.

cheers,
   Alex

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: 0.8 - Internal Window drag not ending when mouse leaves document

WillP-2


Alexander Back wrote:

>
> Hi Will,
>
> WillP wrote:
>> Update: this does not seem to be a problem with Opera but is does happen
>> in
>> Firefox 3.0.5 and IE 6.0
>>
>>
>> WillP wrote:
>>> When an internal window is dragged and the mouse moves outside the
>>> document area (and even outside the browser frame) the drag is not
>>> terminated and if a mouse up happens outside the web page the window
>>> drag
>>> continues when the mouse returns inside the document area - this is not
>>> ideal behaviour.
>>>
>>> I don't know enough about the browsers to know if there is a mouse/drag
>>> exit/leave/out event which could be used to fix this but it would be
>>> good
>>> to know if it is possible for this behaviour to be corrected.
> Unfortunately not. There is no event fired for IE and Firefox when the
> mouse pointer moves outside the browser, so you cannot easily stop the
> drag session.
> You can use the "mouseout" event at the window object, but this still
> does not solve the problem completely. If the user moves out *and* holds
> the mouse button the drag session should be still valid. Or you choose
> to stop the drag session whenever the user leaves the window.
> Anyway, there is no clean solution to this problem and this is the
> reason for no implementation in the framework. Hopefully there will be
> some useful events in all browsers in the future to handle this issue.
>
>
Thanks for clarifying the lack of explicit leave/exit event - I suspected as
much.

Would there be anything wrong with changing the _onMoveMouseMove method of
MMoveable so that if there is no button pressed when a move occurs while the
move state is still in effect (and therefore the mouse up must have happened
outside the document) the move is terminated without any further
repositioning of the moved widget?

In this scenario:
If a move frame is not used the widget stays at the location is was when the
mouse left the document.
If a move frame is used the move operation has no effect at all.

Here's the code.

    _onMoveMouseMove : function(e)
    {
      // Only react when dragging is active
      if (!this.hasState("move")) {
        return;
      }

      if(e.getButton() == "none")
      {
        // Remove drag state
        this.removeState("move");

        // Disable capturing
        this.__moveHandle.releaseCapture();

        // Hide frame afterwards
        if (this.getUseMoveFrame()) {
          this.__getMoveFrame().exclude();
        }
      }
      else
      {
        // Apply new coordinates using DOM
        var coords = this.__computeMoveCoordinates(e);
        if (this.getUseMoveFrame()) {
          this.__getMoveFrame().setDomPosition(coords.left, coords.top);
        } else {
          this.setDomPosition(coords.left, coords.top);
        }
      }
    },

Thanks,

Will

--
View this message in context: http://www.nabble.com/0.8---Internal-Window-drag-not-ending-when-mouse-leaves-document-tp21092362p21330517.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: 0.8 - Internal Window drag not ending when mouse leaves document

Alexander Back
Hi Will,

thanks for your efforts. Unfortunately your proposed solution does not
work - at least not for Firefox 3.
See my comments below.

WillP wrote:
> Would there be anything wrong with changing the _onMoveMouseMove method of
> MMoveable so that if there is no button pressed when a move occurs while the
> move state is still in effect (and therefore the mouse up must have happened
> outside the document) the move is terminated without any further
> repositioning of the moved widget?
This does not work as expected since the qooxdoo event system does not
get the "mouseUp" event which occurs outside the browser. In consequence
the "getButton" method still returns "left".

Anyway, many thanks for your efforts. Your work is really appreciated.

cheers,
   Alex

> Here's the code.
>
>     _onMoveMouseMove : function(e)
>     {
>       // Only react when dragging is active
>       if (!this.hasState("move")) {
>         return;
>       }
>
         // this if-clause is never entered in Firefox 3

>       if(e.getButton() == "none")
>       {
>         // Remove drag state
>         this.removeState("move");
>
>         // Disable capturing
>         this.__moveHandle.releaseCapture();
>
>         // Hide frame afterwards
>         if (this.getUseMoveFrame()) {
>           this.__getMoveFrame().exclude();
>         }
>       }
>       else
>       {
>         // Apply new coordinates using DOM
>         var coords = this.__computeMoveCoordinates(e);
>         if (this.getUseMoveFrame()) {
>           this.__getMoveFrame().setDomPosition(coords.left, coords.top);
>         } else {
>           this.setDomPosition(coords.left, coords.top);
>         }
>       }
>     },

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: 0.8 - Internal Window drag not ending when mouse leaves document

WillP-2

I confess I was looking at IE and I didn't check that FF worked the same -
and it doesn't!

I have just found this comment in qx/event/type/Mouse.js

     * Only internet explorer can compute the button during mouse move
events. For
     * all other browsers the button only contains sensible data during
     * "click" events like "click", "dblclick", "mousedown", "mouseup" or
"contextmenu".

which says it all really - no reliable button state in mouse move events -
shame.

Will.


Alexander Back wrote:

>
> Hi Will,
>
> thanks for your efforts. Unfortunately your proposed solution does not
> work - at least not for Firefox 3.
> See my comments below.
>
> WillP wrote:
>> Would there be anything wrong with changing the _onMoveMouseMove method
>> of
>> MMoveable so that if there is no button pressed when a move occurs while
>> the
>> move state is still in effect (and therefore the mouse up must have
>> happened
>> outside the document) the move is terminated without any further
>> repositioning of the moved widget?
> This does not work as expected since the qooxdoo event system does not
> get the "mouseUp" event which occurs outside the browser. In consequence
> the "getButton" method still returns "left".
>
> Anyway, many thanks for your efforts. Your work is really appreciated.
>
> cheers,
>    Alex
>
>> Here's the code.
>>
>>     _onMoveMouseMove : function(e)
>>     {
>>       // Only react when dragging is active
>>       if (!this.hasState("move")) {
>>         return;
>>       }
>>
> // this if-clause is never entered in Firefox 3
>>       if(e.getButton() == "none")
>>       {
>>         // Remove drag state
>>         this.removeState("move");
>>
>>         // Disable capturing
>>         this.__moveHandle.releaseCapture();
>>
>>         // Hide frame afterwards
>>         if (this.getUseMoveFrame()) {
>>           this.__getMoveFrame().exclude();
>>         }
>>       }
>>       else
>>       {
>>         // Apply new coordinates using DOM
>>         var coords = this.__computeMoveCoordinates(e);
>>         if (this.getUseMoveFrame()) {
>>           this.__getMoveFrame().setDomPosition(coords.left, coords.top);
>>         } else {
>>           this.setDomPosition(coords.left, coords.top);
>>         }
>>       }
>>     },
>
> ------------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for
> just about anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

--
View this message in context: http://www.nabble.com/0.8---Internal-Window-drag-not-ending-when-mouse-leaves-document-tp21092362p21353975.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel