Ext


Go Back   Ext JS Forums > Ext JS Community Forums (1.x) [Unsupported] > Ext 1.x: Bugs

Reply
 
Thread Tools
  #1  
Old 01-04-2007, 11:25 PM
philip142au philip142au is offline
Ext User
 
Join Date: Mar 2007
Posts: 3
philip142au is on a distinguished road
Default Infamous Firefox cursor bug - Info and possible workarounds

Hi,

I have a firefox browser and a IE browser, I have INPUT tag on form on a BasicDialog, but in firefox the cursor doesn't Flash when I click on the input box why?

Please help!

Thanks, Philip
Reply With Quote
  #2  
Old 01-05-2007, 12:58 AM
brian.moeskau's Avatar
brian.moeskau brian.moeskau is offline
Ext JS Contributor
 
Join Date: Mar 2007
Location: Austin, Texas
Posts: 3,258
brian.moeskau is on a distinguished road
Default

I believe this is a FF bug, at least according to Jack. Not sure if there is a solution to it or not.
__________________
Brian Moeskau
FAQ / Tutorials / User Extensions / Enhanced Forum Search

Last edited by brian.moeskau; 09-28-2007 at 06:44 PM.. Reason: removed old yui-ext link
Reply With Quote
  #3  
Old 03-08-2007, 05:48 AM
soso soso is offline
Ext User
 
Join Date: Mar 2007
Posts: 4
soso is on a distinguished road
Default

Did anyone found a solution to this bug?

Thanks
Reply With Quote
  #4  
Old 03-24-2007, 08:42 AM
schmidetzki's Avatar
schmidetzki schmidetzki is offline
Ext User
 
Join Date: Mar 2007
Location: Germany
Posts: 105
schmidetzki is on a distinguished road
Default

It-s definitiv a FF bug.
The only solution I found is to position the dialog content "fixed".
Something like this:
<div>
    <div class="x-dlg-hd ydlg-hd">no title</div>
    <div class="x-dlg-bd ydlg-bd">
	    <div style="position:fixed">
	       ... dialaog content
	    </div>
    </div>
</div>
Reply With Quote
  #5  
Old 03-24-2007, 10:07 AM
amitava's Avatar
amitava amitava is offline
Ext User
 
Join Date: Mar 2007
Posts: 27
amitava is on a distinguished road
Default

I had also faced the similar problem working with yui-ext .33. After some investigating I somehow found that this only happens if shim:true, otherwise its fine. So here is my workaround tested in both FF 1.5 and 2. Not quite sure whether it is the right process.

function show_pm_msg(dlg, hwnd) {
	/* to fix firefox cursor issue */
	var useShim;
	var ua = navigator.userAgent.toLowerCase();
	if (ua.indexOf("msie") > -1){
		useShim = true;
	}else{
		useShim = false;
	}
	
	if(!pm_msg_dlg){ // lazy initialize the dialog and only create it once
		pm_msg_dlg = new YAHOO.ext.BasicDialog(dlg, {
			autoTabs:true,
			autoScroll: true,
			resizable: true,
			width:500,
			height:350,
			shadow:true,
			minWidth:300,
			minHeight:250,
			shim:useShim, //only for ie
			fixedcenter:true,
			proxyDrag: true
		});
		pm_msg_dlg.addKeyListener(27, pm_msg_dlg.hide, pm_msg_dlg);
		pm_msg_dlg.addButton('Close', pm_msg_dlg.hide, pm_msg_dlg);
		pm_btn = pm_msg_dlg.addButton('Submit', reply_to_pm, pm_msg_dlg);
	}		
	pm_msg_dlg.show(hwnd);	
}
Reply With Quote
  #6  
Old 03-28-2007, 05:28 AM
nhausig's Avatar
nhausig nhausig is offline
Ext User
 
Join Date: Mar 2007
Location: Hamburg, Germany
Posts: 6
nhausig is on a distinguished road
Default

Using shim:false only helps in some situations. This bug is a firefox issue and many years old (see https://bugzilla.mozilla.org/show_bug.cgi?id=167801). I've tried many workarounds to no avail. Now there's a solution (see Comment #84). It is somehow ugly. You need a wrapper div around your text input with overflow set to auto and display to none. Then you set display to block after a short delay.

var inputWrapperDiv = ...;

if (YAHOO.ext.util.Browser.isGecko) {
  inputWrapperDiv.style.display   = 'none';
  inputWrapperDiv.style.overflow  = 'auto';
  setTimeout(function() {inputWrapperDiv.style.display = 'block';}, 10);
}
If setting overflow to auto is resulting in scrollbars (resizing elements in wrapper div), you have to give the wrapper div some extra padding.
Reply With Quote
  #7  
Old 03-28-2007, 06:15 AM
amitava's Avatar
amitava amitava is offline
Ext User
 
Join Date: Mar 2007
Posts: 27
amitava is on a distinguished road
Default

Quote:
Originally Posted by nhausig
Using shim:false only helps in some situations. This bug is a firefox issue and many years old (see https://bugzilla.mozilla.org/show_bug.cgi?id=167801). I've tried many workarounds to no avail. Now there's a solution (see Comment #84). It is somehow ugly. You need a wrapper div around your text input with overflow set to auto and display to none. Then you set display to block after a short delay.

var inputWrapperDiv = ...;

if (YAHOO.ext.util.Browser.isGecko) {
  inputWrapperDiv.style.display   = 'none';
  inputWrapperDiv.style.overflow  = 'auto';
  setTimeout(function() {inputWrapperDiv.style.display = 'block';}, 10);
}
If setting overflow to auto is resulting in scrollbars (resizing elements in wrapper div), you have to give the wrapper div some extra padding.
Thanks nhausig for sharing your experience.

BTW, would you please explain a little bit about those other situations where using shim:false doesn't help? Thanks again.

Amitava
Reply With Quote
  #8  
Old 03-28-2007, 06:39 AM
nhausig's Avatar
nhausig nhausig is offline
Ext User
 
Join Date: Mar 2007
Location: Hamburg, Germany
Posts: 6
nhausig is on a distinguished road
Default

Quote:
Originally Posted by amitava
BTW, would you please explain a little bit about those other situations where using shim:false doesn't help? Thanks again.
Amitava
It won't help if there's another cause on the page, not just the shim iframe. The ff bug is about text input overlapping scrollable elements in general. It occurs when you have a text input overlapping a div that has overflow set to auto. There are other fixes than the js-delay-block solution but most of them have unwanted sideeffects and you cannot apply them in general. I stepped into this problem, because usually my apps have a document content area that is housed in a div with auto-overflow, because I want auto-scollbars for the document. Therefore all my modal dialogs with text-entry showed this problem.

Some interesting testcases from the mozilla bug site:

https://bugzilla.mozilla.org/attachment.cgi?id=98624
https://bugzilla.mozilla.org/attachment.cgi?id=245770
https://bugzilla.mozilla.org/attachment.cgi?id=187105
Reply With Quote
  #9  
Old 04-24-2007, 03:03 PM
Jonathan Feinberg Jonathan Feinberg is offline
Ext User
 
Join Date: Mar 2007
Posts: 68
Jonathan Feinberg is on a distinguished road
Default

Here's a workaround that works for me, and gives you a nice, fat, blinking cursor in the text area:

Ext.MessageBox.getDialog().on("show", function(d) {
	var div = Ext.get(d.el);
	div.setStyle("overflow", "auto");
	var text = div.select(".ext-mb-textarea", true);
	if (!text.item(0))
		text = div.select(".ext-mb-text", true);
	if (text.item(0))
		text.item(0).dom.select();
});
Reply With Quote
  #10  
Old 04-25-2007, 11:35 PM
hunkybill's Avatar
hunkybill hunkybill is offline
Ext JS Premium Member
 
Join Date: Mar 2007
Location: Montreal
Posts: 67
hunkybill is on a distinguished road
Send a message via MSN to hunkybill
Default

@Jonathan Feinberg:

Nice. Worked fine for me, but was not really 'fat'!! Nice to finally see a cursor in the middle of a border layout dialog box again. That's the first thing people have bitched to me about, the dang missing cursors in form fields. Nested border layout + dialogs with forms is pretty much a standard necessary pattern for any decent application, and the fact that most INPUT elements over West, Center, or East regions are cursor-less due to CSS sucks big time. Funny how I thought after reading the Bugzilla reports - the solution was to enclose my INPUT elements in a container with overflow:auto. Oops.. me bad.
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"FireFox2 kills cursor" and text-select in toolbar brian Ext 1.x: Bugs 8 06-07-2007 04:12 AM
TextEditor input type text alex1er Ext 1.x: Help 1 01-28-2007 10:59 AM
yui-ext could use a rich text editor for user input entry Bobafart Ext: Feature Requests 2 01-26-2007 11:50 AM
BasicDialog problem with Firefox chris Ext 1.x: Bugs 4 11-18-2006 03:21 PM
Style attribute of text input field for ygrid-page-number maurits Ext 1.x: Help 3 10-02-2006 04:51 AM

All times are GMT -5. The time now is 07:40 PM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.