Spark
  1. Spark
  2. SPARK-1451

Vcard popup is not always showing up on mouse hover

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.7.0
    • Component/s: General
    • Labels:

      Description

      It looks like Spark has a bit weird mouse hover registering. If i slowly drive my mouse pointer and slowly stop hovering the contact, the popup won't come up. Then i have to push a mouse a little bit and then popup will show up. So it is like you have to always jiggle with the mosue to get that popups.

        Activity

        Hide
        Walter Ebeling added a comment -

        I can confirm this behaviour. Please review this. I would consider this to be a side effect of your refactoring.

        Show
        Walter Ebeling added a comment - I can confirm this behaviour. Please review this. I would consider this to be a side effect of your refactoring.
        Hide
        Mircea Carasel added a comment -

        I confirm too. I also tested with spark 2.6.3 installation on Windows 7 and I see the same behavior

        Show
        Mircea Carasel added a comment - I confirm too. I also tested with spark 2.6.3 installation on Windows 7 and I see the same behavior
        Hide
        wroot added a comment -

        Yes, this is a 2.6.3 (and maybe older) issue.

        Show
        wroot added a comment - Yes, this is a 2.6.3 (and maybe older) issue.
        Hide
        Mircea Carasel added a comment -

        commited r12885 = 327c8d519cae7439954bcec71aebf0e54f59466a

        -removed the listener that was setting canShowPopup=true each 0.5 seconds
        I couldn't find any reason for this listener. I set canShowPopup=true on mouseEntered event
        It prevented MouseMotionListener to be notified once the mouse enters contactlist component

        Show
        Mircea Carasel added a comment - commited r12885 = 327c8d519cae7439954bcec71aebf0e54f59466a -removed the listener that was setting canShowPopup=true each 0.5 seconds I couldn't find any reason for this listener. I set canShowPopup=true on mouseEntered event It prevented MouseMotionListener to be notified once the mouse enters contactlist component
        Hide
        wroot added a comment -

        Popups now works fine. Though i'm thinking, maybe there could be a slight delay before showing it? Now they pop up immediately when you hover a contact, so it can be very annoying while dragging your mouse above the list of your contacts. Maybe that 0.5 seconds was about that? But the implementation was wrong. I mean, if you stop above the contact it should wait for x.x seconds and then show the popup, but if you start dragging again it shouldn't show it immediately but wait for another x.x seconds. If that's possible.

        Show
        wroot added a comment - Popups now works fine. Though i'm thinking, maybe there could be a slight delay before showing it? Now they pop up immediately when you hover a contact, so it can be very annoying while dragging your mouse above the list of your contacts. Maybe that 0.5 seconds was about that? But the implementation was wrong. I mean, if you stop above the contact it should wait for x.x seconds and then show the popup, but if you start dragging again it shouldn't show it immediately but wait for another x.x seconds. If that's possible.
        Hide
        Mircea Carasel added a comment -

        I tried to keep a 0.5 delay when showing the popup, but this lead to another problem. When you are playing with the mouse and moving it over the contact list area, there were cases when the mouse was positioned to a contact, but the popup showed was of another contact.

        In the original code, the 0.5 delay didn't work either. Because of the delay, the mouse motion listener didn't do anything first time mouse enters the contact list area (popup not shown). On the next mouse move, the popup started to be shown with no delay.

        Show
        Mircea Carasel added a comment - I tried to keep a 0.5 delay when showing the popup, but this lead to another problem. When you are playing with the mouse and moving it over the contact list area, there were cases when the mouse was positioned to a contact, but the popup showed was of another contact. In the original code, the 0.5 delay didn't work either. Because of the delay, the mouse motion listener didn't do anything first time mouse enters the contact list area (popup not shown). On the next mouse move, the popup started to be shown with no delay.
        Hide
        Mircea Carasel added a comment -

        Finally I found a solution to require 0.5 seconds for the mouse to be still until showing the popup

        commited: r12894 = 0788c445a81c3a3a89d164152c1fde5663efa4f5

        -introduced a timer listener to wait 0.5 seconds until the popup to be displayed
        -track latest mouse move time, expect 0.5 for the mouse to be still until displaying the popup

        Show
        Mircea Carasel added a comment - Finally I found a solution to require 0.5 seconds for the mouse to be still until showing the popup commited: r12894 = 0788c445a81c3a3a89d164152c1fde5663efa4f5 -introduced a timer listener to wait 0.5 seconds until the popup to be displayed -track latest mouse move time, expect 0.5 for the mouse to be still until displaying the popup
        Hide
        wroot added a comment -

        Works better now. Maybe this is not related to this fix, but i see Contacts tab now, though it should be hidden, as gateways are not in the tab and conferences tab is hidden.

        Show
        wroot added a comment - Works better now. Maybe this is not related to this fix, but i see Contacts tab now, though it should be hidden, as gateways are not in the tab and conferences tab is hidden.
        Hide
        Mircea Carasel added a comment -

        commited
        r12923 = c346206b38338c06cfef3faee8d51e65162c7dd0

        small improvement->avoid maintaining state for Timer (Timer already canceled exception may be thrown from time to time)
        -a stateless approach is much better - we create the timer every time mouse enters IM area

        Show
        Mircea Carasel added a comment - commited r12923 = c346206b38338c06cfef3faee8d51e65162c7dd0 small improvement->avoid maintaining state for Timer (Timer already canceled exception may be thrown from time to time) -a stateless approach is much better - we create the timer every time mouse enters IM area

          People

          • Assignee:
            Mircea Carasel
            Reporter:
            wroot
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: