Opened 7 years ago

Closed 7 years ago

#15840 closed defect (fixed)

TextBox: placeholder prevents focus when TextBox is placed in Toolbar with buttons

Reported by: Roman Owned by: Douglas Hays
Priority: blocker Milestone: 1.7.4
Component: Dijit - Form Version: 1.7.3
Keywords: Cc:
Blocked By: Blocking:

Description

When textbox is placed into Toolbar with adjacent Buttons clicking on placeholder text in TextBox? does not bring focus. Focus goes to Toolbar and Buttons instead.

I am 90% sure this was working properly in 1.7.2 and broken in 1.7.3.

Testcase is attached.

BUG:

<span data-dojo-type="dijit.Toolbar" data-dojo-props="region:'top'">
<input type="button" data-dojo-type="dijit.form.Button"   label="Create" iconClass="dijitIconNewTask"></input>
<span data-dojo-type="dijit.ToolbarSeparator"></span>
<input type="button" data-dojo-type="dijit.form.Button"   label="Reload" iconClass="dijitIconUndo"></input>
<input type="text" data-dojo-type="dijit.form.TextBox"  placeHolder="Click on this placeholder text to see the focus bug" style="width: 330px;"></input>
</span>

NO BUG:

<span data-dojo-type="dijit.Toolbar" data-dojo-props="region:'top'">
<input type="text" data-dojo-type="dijit.form.TextBox"  
placeHolder="TextBox in toolbar without sibling buttons. No bug here." style="width: 530px;"></input>
</span>

NO BUG:

<input type="text" data-dojo-type="dijit.form.TextBox"   
placeHolder="standalone textBox, no bug here" style="width: 330px;"></input>

Attachments (2)

toolBarTestcase.html (2.1 KB) - added by Roman 7 years ago.
15840.patch (789 bytes) - added by Douglas Hays 7 years ago.
fix

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by Roman

Attachment: toolBarTestcase.html added

comment:1 Changed 7 years ago by bill

Component: DojoX FormDijit - Form
Owner: changed from dante to Douglas Hays
Status: newassigned
Summary: TextBox placeholder prevents focus when TextBox is placed in Toolbar with buttonsTextBox: placeholder prevents focus when TextBox is placed in Toolbar with buttons

comment:2 Changed 7 years ago by Roman

In 1.8.0 it is fixed for all cases except when there's only toolbar button besides TextBox?.

comment:3 Changed 7 years ago by Douglas Hays

Milestone: tbd1.7.4
Priority: undecidedblocker

regression started with [28181] in 1.7.3

Changed 7 years ago by Douglas Hays

Attachment: 15840.patch added

fix

comment:4 Changed 7 years ago by Douglas Hays

kroman, can you please test with the attached patch?

comment:5 Changed 7 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

In [29682]:

Fixes #15840. Don't allow mousedown on placeholder text to activate any default handlers, bypassing Textbox handling.

Note: See TracTickets for help on using tickets.