#6329 closed bug (duplicate)
hover, mouseenter, mouseleave do not behave as expected when entering from or exiting to a textarea or text input.
Reported by: | eternicode | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.5.1 |
Component: | event | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Functions attached to a subject via the mouseenter and mouseleave functions (or alternatively the hover function) are not triggered if:
- the mouse, on leaving the subject, enters a textarea or text input
- the mouse, on entering the subject, has left a textarea or text input
I first noticed this while using version 1.3.2, but it seems to happen with 1.4.2 as well.
In the attached file, hovering from the page to the div and vice-versa expand and shrink the div as expected. However, if you hover from the page to the div, then from the div to the textarea (or to the input), the div will not shrink as expected. It is the same for hovering in from the textarea/input then hovering out to the page.
Attachments (1)
Change History (12)
Changed 14 years ago by
Attachment: | jquery_issue.html added |
---|
comment:1 Changed 13 years ago by
Priority: | → low |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
This behavior no longer exists.
comment:3 Changed 13 years ago by
Replying to anonymous:
still exists for chrome 10.0.612
The current stable version is 8.0.552.224 so if this behavior reappeared with a bleeding edge development version report on the chrome bug tracker
comment:5 Changed 13 years ago by
Hmm, another dupe of this just came in (7828), related chrome thread:
comment:6 Changed 13 years ago by
I'm seeing this behaviour with the current stable version of Chrome (9.0.597.84). A hover event handler is present on a parent div element to a text input element. Hovering the parent div triggers the event correctly, this is then cleared when entering the child input element.
Works in IE 8, F 3.5, not in Chrome. It seems that the event isn't being passed up the chain - or something. I have no idea whether this is a fault in Chrome or JQuery, it would be great to get some expert eyes on it.
comment:7 Changed 13 years ago by
By omitting a second hover function, jQuery will re-execute the first hover function "on hover out". So if the first function toggle's a class, the second will too.
Take a look at this:
comment:8 Changed 13 years ago by
@rwaldron: thanks for your reply. You're correct; I understand this. I'm using the toggle deliberately to add the class on enter and remove it when leaving. I could have used addClass() and removeClass() in the in/out handlers to be more specific. This displays the same, buggy, behaviour though.
I've updated the fiddle to include a workaround that keeps the input visible, as well as the demonstration of the behaviour.
I'm not sure if this is a JQuery thing or if Chrome is not bubbling the event to the parent for some reason.
comment:9 Changed 13 years ago by
Keywords: | browser-bug added; hover mouseenter mouseleave removed |
---|---|
Milestone: | 1.4.3 → 1.5.1 |
Resolution: | worksforme |
Status: | closed → reopened |
Version: | 1.4.2 → 1.5 |
comment:10 Changed 13 years ago by
Keywords: | browser-bug removed |
---|---|
Resolution: | → duplicate |
Status: | reopened → closed |
Self-contained HTML file that demonstrates a bug with hover (mouseenter / mouseleave)