Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#15728 closed defect (fixed)

ValidationTextBox: HTML5 pattern attribute causes double tooltip in Firefox

Reported by: Paul Christopher Owned by: Douglas Hays
Priority: undecided Milestone: 1.8.1
Component: Dijit - Form Version: 1.8.0b1
Keywords: Cc:
Blocked By: Blocking:



When specifying a regex for a ValidationTextBox, a pattern attribute gets added to the inputs dom node like so

<input pattern="..." />

However this causes Firefox to display its own error tooltip which interferes with Dojo's error tooltip. One the one hand, two tooltips do not look nice. On the other hand, Firefox's tooltip does not respect the language set via the html lang attribute and dojo.config.locale.

Steps to reproduce the issue

Run the attached test file. Enter an invalid email, e.g. "test". Hit "Validate" and salute Firefox for his marvellous HTML5 capabilities.

Now cross-check: Uncomment the given fix in the test file (which simply removes the pattern attribute from the dom node by domAttr.remove('input', 'pattern')). Again enter "test" and hit "Validate". There will be no second tooltip anymore.

Affected browsers

So far Firefox only since several versions, see


Don't know where this pattern attribute comes in, but from a usability point of view, this is a bigger problem for me at the moment: Wrong languages, Dijit's look 'n feel totally broken.

Attachments (3)

screenshot.png (161.8 KB) - added by Paul Christopher 8 years ago.
testMailValidation.html (1.2 KB) - added by Paul Christopher 8 years ago.
15728.patch (1.1 KB) - added by Douglas Hays 8 years ago.

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by Paul Christopher

Attachment: screenshot.png added

Changed 8 years ago by Paul Christopher

Attachment: testMailValidation.html added

comment:1 Changed 8 years ago by Douglas Hays

Milestone: tbd1.8.1
Status: newassigned

Changed 8 years ago by Douglas Hays

Attachment: 15728.patch added

comment:2 Changed 8 years ago by Paul Christopher

Thanks for the quick reply and the patch, Doug! It really works great now and the patch saves me a lot of trouble. Many thanks and have a nice weekend!

comment:3 Changed 7 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

In [29512]:

Fixes #15728. Prevent pattern from being set on the native INPUT element

comment:4 Changed 7 years ago by Paul Christopher

There is also a "novalidate" tag for forms in HTML5, see Setting this on dijit/form should prevent any validation (but I have not yet tested this.)

Note: See TracTickets for help on using tickets.