Opened 10 years ago
Closed 10 years ago
#12713 closed bug (duplicate)
:focus returns false on div with contenteditable="true"
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi (:
jQuery('div[contenteditable]').is(':focus') allways returns false (Firefox 15.0.1). I'm using jQuery 1.8.2.
My solution to fix it is to check the document.activeElement. if (jQuery('div[contenteditable]').get(0) == document.activeElement) {
has focus
} else {
has no focus
} this seams to work pretty fine for me (not tested in different browsers than Firefox!)
I know it's a duplication of http://bugs.jquery.com/ticket/12646 but therefore that ticked was closed cause it's a duplication for the textarea tic I've decided to open a new one for divs.
Note: See
TracTickets for help on using
tickets.
Duplicate of #12648.