-
6 Feb 2012 8:15 AM #1
[4.1b2] Tooltip steals focus when hidden
[4.1b2] Tooltip steals focus when hidden
Test case in post below
If a text field has focus and a tooltip is shown (anywhere in the application). When the tootip is hidden (either by using hide() or if the tooltip display timeout expires), the focus is no longer on the text field and is lost.
This becomes an irritating issue when forms have tooltip on items and also contain text fields. As soon as any tooltip gets shown and is then hidden, user no longer has focus on the text field he was editing.
-
6 Feb 2012 12:35 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 435
What browser are you seeing this on? I opened the Dynamic form example and focused on the first text field which has allowBlank : false. I then tab to the next one and the error icon shows in the first text field. Focus being on the 2nd field, I mouse over the error icon which produces a tip but the 2nd field still has focus.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
13 Feb 2012 6:12 AM #3
A little investigation revealed that it happens when tooltip is in a modal window. Run the example below and type something in the text box, then hover mouse over checkbox which shows the tooltip. Move mouse away from checkbox, as soon as the tooltip is hidden, the focus is lost.
Code:Ext.define('UI.form.LoginDialog', { extend: 'Ext.window.Window', requires: ['Ext.layout.container.Border', 'Ext.form.Panel', 'Ext.form.field.Checkbox'], alias: 'widget.logindialog', width: 420, height: 130, title: 'Login', modal: true, formPanel: undefined, initComponent: function() { var config = {}; Ext.applyIf(this, Ext.apply(this.initialConfig, config)); this.usernameField = { xtype: 'textfield', name: 'data[User][username]', fieldLabel: 'Username', validateOnBlur: false, allowBlank: false }; this.passwordField = this.passwordField || {}; this.passwordField = { xtype: 'textfield', inputType: 'password', name: 'data[User][password]', fieldLabel: 'Password' }; this.rememberMeField = this.rememberMeField || {}; this.rememberMeField = Ext.Object.merge({ xtype: 'checkbox', itemId: 'rememberMe', name: 'data[User][rememberme]', padding: '0 0 0 80', boxLabel: 'Remember me on this computer', listeners: { render: function(checkbox) { checkbox.bodyEl.child('input').set({ 'data-qtip': 'This is not recommended for shared computers.' }); }, scope: this } }, this.rememberMeField); this.formPanel = this.formPanel || {}; this.formPanel = Ext.create('Ext.form.Panel', Ext.Object.merge({ bodyPadding: 10, header: false, region: 'center', border: false, waitMsgTarget: true, layout: { type: 'vbox', align: 'stretch' }, defaults: { labelWidth: 75 }, items: [ this.usernameField, this.passwordField, this.rememberMeField ] }, this.formPanel)); this.items = [this.formPanel]; this.callParent(arguments); } }); Ext.require('UI.form.LoginDialog'); Ext.onReady(function() { Ext.tip.QuickTipManager.init(); var loginDialog = Ext.create('UI.form.LoginDialog', {}); loginDialog.show(); });
-
15 Feb 2012 12:23 PM #4
-
18 May 2012 3:06 PM #5
Any chance a fix can come in 4.1.1?
-
29 Oct 2012 4:59 AM #6
Fixing this issue seems to be on the road map for 4.2.
-
29 Oct 2012 12:04 PM #7
I think this was EXTJSIV-5450 which was fixed in 4.1.3
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
You found a bug! We've classified it as
EXTJSIV-5379
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote