Skip to main content

Bug Tracker

Side navigation

#12713 closed bug (duplicate)

Opened October 12, 2012 09:01AM UTC

Closed October 12, 2012 12:46PM UTC

:focus returns false on div with contenteditable="true"

Reported by: pascal.wacker@tilllate.com 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.

Attachments (0)
Change History (1)

Changed October 12, 2012 12:46PM UTC by mikesherov comment:1

resolution: → duplicate
status: newclosed

Duplicate of #12648.