×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    34

    dragend event not working

    Hello everybody,

    I have problem with dragend event, when i use Web app emulator, it works but i doesn't work on the phone. I think that the problem is emulator uses the mouse, but the phone uses a finger

    On the phone when i drag the map and then push a button, the event triggers. The reason may be that the phone thinks that the finger is still on the map and dragging event continues. If you have any idea to overcome this problem or a work around it, please help me.
    (Note: the dragstart event works fine)

    my code is the following:
    Code:
    mapfield.addListener("dragend", function(evt){
    	//do something
    });
    Best Regards,
    Onur

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: dragend event not working

    have you checked our wiki already: http://www.developer.nokia.com/Commu..._touch_devices

  3. #3
    Registered User
    Join Date
    Oct 2011
    Posts
    34

    Re: dragend event not working

    Thanks symbianyucca for your reply. I already checked that before, use those codes on my widget, but dragend event doesn't work. The other events are working such as mousedown, mousemove when i use my finger.
    I also tried mouseup event to catch the end of a dragging event, but when you press the mouse button and move the mouse (which is like dragging), and after than release the mouse button, the mouseup event does not work. (mouse or finger, the result is the same)

  4. #4
    Super Contributor
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: dragend event not working

    Hi,

    I'm afraid that this is limitation of the platform and thus cannot be fixed easily.
    Mouseup event is fired only, when finger is lifted just after mousedown event is fired.

    I don't know is what is your exact use case for mouseup scenario, but I was thinking if you could monitor map panning?
    For example trigger the event, that you would normally do in mouseup/dragend, if map has not been moved for 500ms.


    Br,
    Ilkka

  5. #5
    Registered User
    Join Date
    Oct 2011
    Posts
    34

    Re: dragend event not working

    I tried to use mouseup event just to mimic dragend event ("mouse up while mouse is moving" is similar to "dragend" (only if mouse up worked when mouse is moving)),
    however i plan to use a time limit like you suggested or a distance limit. Thanks for your reply.

    Onur

  6. #6
    Registered User
    Join Date
    Oct 2011
    Posts
    34

    Re: dragend event not working

    I really think that dragend event is buggy. The description here actually says that is also covers finger. but it does not work with finger when I use it on nokia E6.

    Does it really work in any touch devices? If so, am I doing it wrong or do e6 and some other mobile devices not support this event?

    Here is what happens on E6:
    When you hold your finger on the screen and move your finger and release it the dragend event is not fired (which should be fired).
    It is fired only sometimes when you slide fastly your finger on the screen only for a moment (like cutting a fruit in the fruit ninja game.)

    This seems to be a bug, if it is so how should report it?

  7. #7
    Super Contributor
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: dragend event not working

    Hi,

    Ovi maps API is mainly targeted to desktop browser and web sites. For WRT, the best bet is to use Map Image API.

    Br,
    Ilkka

  8. #8
    Registered User
    Join Date
    Oct 2011
    Posts
    34

    Re: dragend event not working

    Thank for reply, i think i could develop some workaround, but I need to know if in any element of html (such as div) is able to capture the dragend(by dragend I mean: move your finger on the screen, then take it away) event from the phone.

    for example

    Code:
    <div id="elem"></div>
    ....
    document.getElementById ("elem").addEventListener ("dragend", someFunction, false);

Similar Threads

  1. Enumeratedpopup text event not working on device
    By pallavi0703 in forum Symbian User Interface
    Replies: 4
    Last Post: 2010-09-20, 08:06
  2. SetTime is not working in add call log event
    By keerthi.ck06 in forum Symbian
    Replies: 4
    Last Post: 2010-03-19, 01:03
  3. Key event is not working
    By PankajNeve in forum Symbian
    Replies: 5
    Last Post: 2006-07-07, 08:54
  4. Key event not working in 7650 simulator
    By shahzad73 in forum PersonalJava
    Replies: 1
    Last Post: 2002-12-18, 21:38
  5. Key event not working in 7650 simulator
    By hillcast1 in forum Mobile Java General
    Replies: 1
    Last Post: 2002-12-15, 14:47

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •