Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#10708 closed defect (fixed)

Editor toolbar buttons that are comboboxes or input fields no longer work

Reported by: Jared Jurkiewicz Owned by: bill
Priority: high Milestone: 1.5
Component: Dijit - Form Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:

Description

[REGRESSION][LUCID_RELATED] Editor toolbar buttons that are comboboxes or input fields no longer work

This can be easily seen on: http://archive.dojotoolkit.org/nightly/checkout/dijit/tests/editor/test_FontChoice.html

Try to click in one of the filtering selects to type ... the cursor will immediatelt jump to the editor body. Something in Editor related to lucid work is now preventing input fields in the toolbar.

This can also be seen in: http://archive.dojotoolkit.org/nightly/checkout/dojox/editor/tests/editorFindReplace.html

Open the search bar (the flashlight icon), and try to tab or type to a field. The moment the cursor enters the field, it's immediately diverted to the editor body, making it impossible to actually use the find/replace.

Change History (7)

comment:1 Changed 9 years ago by bill

Component: GeneralDijit
Status: newassigned
Summary: [REGRESSION][LUCID_RELATED] Editor toolbar buttons that are comboboxes or input fields no longer workEditor toolbar buttons that are comboboxes or input fields no longer work

Thanks for catching this. I did break this, with the _CssStateMixin stuff, in [21193]. It's this mouseUp code in _CssStateMixin, copied from _FormWidget:

if(this._mouseDown && this.isFocusable()){
	this.focus();
}

I guess that should only be running for form widgets themselves.

I'm removing the [regression] tag from the summary since we generally use that to indicate stuff that broke in a release (but was working in a previous release).

comment:2 Changed 9 years ago by bill

PS: That focus code originally dates back to #5434 ([11894]), and #6888 ([13893]).

comment:3 Changed 9 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [21299]) Move onclick --> focus() code from _CssStateMixin back to _FormWidget.

This code was added in to _FormWidget in [11894] and [13893] so that clicking a non-focusable part of a form widget (ValidationTextBox validation icon, or the spinner up/down arrows) would cause the form widget to focus. But, it's inappropriate for bigger widgets, in particular Editor.

Actually I was nervous that it wouldn't even work correctly for ComboButton (which has two focus points), but it seems to.

Refs #5434, #6888, #10613. Fixes #10708 !strict.

comment:4 Changed 9 years ago by bill

(In [21300]) Forgot disconnect call in [21299], refs #10708 !strict.

comment:5 Changed 9 years ago by Jared Jurkiewicz

Okay, cool, makes sense. That explains a lot. thanks for fixing that.

comment:6 Changed 9 years ago by bill

(In [21387]) Put onMouseUp --> focus() handling in FormWidget not FormValueWidget, as it was in the 1.4 release.

Otherwise on hrome clicking a button doesn't give it focus, which leads to problems restoring focus when closing a Dialog. (Dialog_menu.html is actually failing because focus is restored to the DateTextBox inside of the dialog, Refs #5434, #6888, #10613. Fixes #10708 !strict.

comment:7 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.