Opened 10 years ago
Closed 10 years ago
#13386 closed bug (worksforme)
focus() on contenteditable DIV with height & width of 0
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | git |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
For a DIV of size 0 with contenteditable true, jQuery focus() method doesn't seem to work. When I replace it with .get(0).focus(), the native JS method, it works.
Change History (2)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Here's the exact code:
var pasteCatcher = $(document.createElement("div")); pasteCatcher.attr("contenteditable","true").css({width : "0", height : "0", overflow : "hidden", outline : 0}); $("body").prepend(pasteCatcher);
$(document).bind("paste", function() {
});