Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Fix issue #2306 (Recent projects close arrow fail to close without mouse move) #2467

Open
core-ai-bot opened this issue Aug 29, 2021 · 13 comments

Comments

@core-ai-bot
Copy link
Member

Issue by jbalsas
Thursday Jan 17, 2013 at 22:23 GMT
Originally opened as adobe/brackets#2590


This is a possible fix for issue #2306. It changes click to mouseup as the event to close an entry in the list of recent projects.

It seems that jquery click event is not triggered if the mouse is already over the svg element when the old one is removed and the new one rendered, but mouseup is.

I'd say it has something to do with the lack of mouseenter, but I haven't been able to replicate it anywhere else outside this.


jbalsas included the following code: https://github.com/adobe/brackets/pull/2590/commits

@core-ai-bot
Copy link
Member Author

Comment by WebsiteDeveloper
Sunday Feb 10, 2013 at 18:18 GMT


this change seems to fix the issue but i couldn't find out why
i tested this and found out that the checkHovers() Funtions seems to be the root of our problem, because when commenting out the call to that functions it works nicely for me

@core-ai-bot
Copy link
Member Author

Comment by WebsiteDeveloper
Sunday Feb 10, 2013 at 18:27 GMT


It seems a simple change in the checkHovers() functions also fixes the problem:
Instead of this:

$(".recent-folder-link", this).triggerHandler("mouseenter");

This works:

$(this).triggerHandler("mouseenter");

Instead of all links just trigger mouseenter on the current li

@core-ai-bot
Copy link
Member Author

Comment by WebsiteDeveloper
Wednesday Feb 13, 2013 at 20:01 GMT


@jbalsas whats your opinion?

@core-ai-bot
Copy link
Member Author

Comment by jbalsas
Wednesday Feb 13, 2013 at 20:37 GMT


Hi@WebsiteDeveloper. I'm also still puzzled by this... my intuition is that somehow if the element doesn't detect the mouseover, jquery won't trigger the click event (it actually doesn't seem to even trigger mousedown), but I haven't been able to reproduce it anywhere else so far...

I've tried your solution and if I switch the line in checkHovers with your suggestion, then, after closing one project, the close arrow won't appear again until I move the mouse. Can you please verify if this happens to you?

@core-ai-bot
Copy link
Member Author

Comment by WebsiteDeveloper
Wednesday Feb 13, 2013 at 21:03 GMT


@jbalsas in my version it works fine with my change what version of brackets are you using?
i am using the current master from the brackets repo

@core-ai-bot
Copy link
Member Author

Comment by jbalsas
Thursday Feb 14, 2013 at 00:10 GMT


I've tested it on this branch merged with master, and alone just in master and in both cases the close icon won't show.

@WebsiteDeveloper Maybe I didn't get your suggestion right. As you say, $(this).triggerHandler("mouseenter"); triggers the event handlers to the li nodes. The issue is that the mouseenter callback that calls showDeleteButton is placed on the a nodes, so the button won't show unless you move the mouse after deleting one item. Am I missing something?

If we could get it to work, I'd rather have something like what you suggest, as to me, it looks closer to the original intent of the code.

@core-ai-bot
Copy link
Member Author

Comment by WebsiteDeveloper
Thursday Feb 14, 2013 at 07:10 GMT


Actually when i print out this on the console i get <li><a class="recent-folder-link">...</a></li>
which means the hover handlers get also called for the <a> nodes so for me it actually works fine
maybe you could verify that by adding a console.log(this) statement before the call to triggerHandler on line 96

@core-ai-bot
Copy link
Member Author

Comment by jbalsas
Thursday Feb 14, 2013 at 20:43 GMT


Sorry, but it's still not working for me. I also can't quite see why triggering it from the <li> nodes should cause it to trigger the handlers on the <a> elements...

Could you maybe put your code together in a branch and push it to your github account so I could clone it and check it myself?

@core-ai-bot
Copy link
Member Author

Comment by WebsiteDeveloper
Thursday Feb 14, 2013 at 22:15 GMT


i'll push a branch tomorrow

@core-ai-bot
Copy link
Member Author

Comment by WebsiteDeveloper
Friday Feb 15, 2013 at 08:06 GMT


@jbalsas
https://github.com/WebsiteDeveloper/brackets/tree/Issue-2306 here is the branch which is working for me

@core-ai-bot
Copy link
Member Author

Comment by jbalsas
Saturday Feb 16, 2013 at 17:31 GMT


@WebsiteDeveloper Thanks for putting the branch together. I just cloned it, but sadly it's still not working for me.

Are you by any chance on Windows? I'm running on MacOS, so maybe this is somehow platform-specific... I don't have access to any windows machine to check it out so maybe someone else could pitch in...

@core-ai-bot
Copy link
Member Author

Comment by WebsiteDeveloper
Saturday Feb 16, 2013 at 17:35 GMT


@jbalsas it seems to be platform specific because i am running a windows 7 machine
maybe it has something to do with the brackets shell handling of certain mouse events
@njx could you please look at this

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Wednesday Mar 20, 2013 at 22:32 GMT


@jbalsas This looks good on Mac 10.8 and Win 7

@WebsiteDeveloper Thanks for reviewing this pull request. I also tried your solution, but it doesn't work on Mac 10.8. After removing the first item from list, the (x) icon is not displayed on the item that moves under the mouse (and click doesn't do anything), so it's actually worse.

Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant