No link-hints for click handlers, registered with jQuery.live
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 27k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Consider the following example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Link-hints for jquery.live</title>
<style>.spoiler_title { text-decoration: underline; cursor: pointer; }</style>
</head>
<body>
<div class="html_format">
<div class="spoiler">
<b class="spoiler_title">Spoilers!</b>
<div class="spoiler_text" style="display: none;">
<span>Hidden text is here!</span>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-1.8.3.min.js"></script>
<script>
$(".html_format .spoiler_title").live("click", function() {
var spoiler = $(this).closest(".spoiler");
$("> .spoiler_text", spoiler).slideToggle();
spoiler.toggleClass("spoiler_open");
});
</script>
</body>
</html>
Press f to show link-hints.
Expected: There is a link-hint to expand/collapse spoiler.
Actual: There is none.
Tested on both master and post-1.46.
The following code was extracted from the popular Russian-speaking collaborative blog habrahabr.ru, so the impacted number of people for this particular example is rather high.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied HTML reproducer with jQuery 1.8.3 and pressing f to confirm that the delegated .live("click", ...) handler has no hint. Then trace the existing link-hint detection and event-registration handling; done means the spoiler control receives a hint and still expands or collapses when activated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100