Opened 5 years ago

Closed 5 years ago

#18280 closed defect (invalid)

Focus manager does not cancel focusout after selection.addRange

Reported by: lbus Owned by: lbus
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.10.0
Keywords: Cc:
Blocked By: Blocking:

Description

We have a special editor widget placed in dgrid. When we trigger paste event (CTRL+V) the editor is closed without saving changes.

We found that root cause of this behaviour is that the editor pastes the content and extends the selection by pasted text by calling selection.addRange on paste event which triggers focusout event on document body caught by global focus manager (dojo/focus).

The global focus manager is able to cancel focusout comming right after focusin or mousedown, touchstart however there is no such handling for focusout triggered automatically by selection.addRange.

Our temporary workaround is to do exactly same trick with timeout after 'paste' event.

Windows 7 / Chrome 37.0.2062.124

Change History (2)

comment:1 Changed 5 years ago by bill

Component: GeneralDijit
Owner: set to lbus
Status: newpending

How do you tell that the focusout event occurred right after a selectionaddRange?

Also, I would need a test case to reproduce this before working on the ticket (or alternately instructions on how to reproduce with an existing test case. Preferably a test case without dgrid or your custom editor.

comment:2 Changed 5 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.