|
|||||||
![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
I believe this is a FF bug, at least according to Jack. Not sure if there is a solution to it or not.
Last edited by brian.moeskau; 09-28-2007 at 06:44 PM.. Reason: removed old yui-ext link |
|
#3
|
|||
|
|||
|
Did anyone found a solution to this bug?
Thanks |
|
#4
|
||||
|
||||
|
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>
|
|
#5
|
||||
|
||||
|
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);
}
|
|
#6
|
||||
|
||||
|
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);
}
|
|
#7
|
||||
|
||||
|
Quote:
BTW, would you please explain a little bit about those other situations where using shim:false doesn't help? Thanks again. Amitava |
|
#8
|
||||
|
||||
|
Quote:
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 |
|
#9
|
|||
|
|||
|
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();
});
|
|
#10
|
||||
|
||||
|
@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. |
![]() |
| Thread Tools | |
|
|
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 |