Hi Dietrich,

the solution you propose is interesting and indeed it results in a 
textfield with a cursor, the right z-Index and the possibility to select 
text. But it cannot be used because it messes up the layout of the page. 
Since a subwidget is usually placed relatively to the parent widget, 
setting position:fixed will result in positioning it relatively to the 
client window, i.e. it will be x pixels from the left and y pixels from 
the top instead of x pixels from the left of the parent widget and y 
pixels below the top of the parent. Of course, you can try fixing this 
by the following code:

  this.addEventListener("click", function(e) {
    if((new QxClient).isGecko())
      {
        this.setLeft( QxDOM.getComputedClientBoxLeft ( this.getElement() 
)  );
        this.setTop( QxDOM.getComputedClientBoxTop ( this.getElement() )  );
        this.setStyleProperty("position","fixed");
      };
  });

But then the layout seems to be a few pixels off the computed values, so 
clicking on the textfield moves them, and you cannot correct it because 
the second time you click on it the computed values will be off again 
(this is qooxdoo 0.1 !).

But more fatally, position:fixed doesn't work at all in scrollable areas.

Too bad, I was initially enthousiastic too see the cursor and the 
selection!!

Thanks anyways,

Christian



Dietrich Streifert schrieb:
> @Christian:
>
> The mozilla guys seem to have solved the bug for their current trunk 
> build of FireFox. The fix is not yet in the FireFox 2 Beta 1. So we 
> have to wait for FireFox 2 Beta 2.
>
> There is also mentioned a workarround ing bug #167801 comment #50:
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=167801#c50
>
> ---snip---
>
> For a simple fix, without the need for real javascript.
>
> In CSS you can use:
>
> position:fixed;
> position:expression("absolute");
>
> Mozilla will use fixed and work correctly, IE will use absolute and work
> correctly. I know its a hack, but this will work for Mozilla and IE, 
> until
> things are fixed in Mozilla and publicly released.
>
> This was tested on IE 6.0 and Firefox 1.5
>
> ---snap--
>
> There is also a simple example showing the bug:
>
> https://bugzilla.mozilla.org/attachment.cgi?id=99019
>
> I tried to set the input field in the example to position:fixed and it 
> worked for FireFox and the caret is visible all the time. Here is the 
> modified example which uses position:absolute for the first input tag 
> and position:fixed for the second input field.
>
> So you may be able to work out a solution by doing by setting 
> position:fixed for Mozilla browsers and position:absolute for IE.
>
>
> Christian Boulanger schrieb:
>> Ok, since I couldn't stand the whining and nagging of the users of my 
>> Qooxdoo 0.1 application, I invested some time into the question how 
>> to work around the gecko-based browser (Firefox / Mozilla) bug which 
>> prevents the display of the cursor in input fields in widgets that 
>> hover over other widgets.
>>
>> There are a few hints online, but they all did not help me. For example:
>>
>> https://bugzilla.mozilla.org/show_bug.cgi?id=167801
>>
>> counsels to set the underlying Divs' overflow property to "none".
>>
>> However, the exact opposite seems to be true!
>>
>> When I hacked the QxTextField source (remember, this is qooxdoo 0.1!) 
>> as follows:
>>
>> function QxTextField(vText)
>> {
>>   QxWidget.call(this);
>>
>>   if(isValid(vText)) {
>>     this.setText(vText);
>>   };
>>
>>   this.setHtmlProperty("type", "text");
>>  
>>   this.setTabIndex(1);
>>   this.setCanSelect(true);
>>  
>>   this.setTagName("INPUT");
>>   this.setTextAlign("left");
>>  
>>   this.addEventListener("blur", this._onblur);
>>   this.addEventListener("focus", this._onfocus);
>> /** start hack CB**/
>>   this.addEventListener("click", function(e) {
>>     this.getParent().getElement().style.overflow="auto";
>>   });
>> /** end hack **/
>> };
>>
>> QxTextField.extend(QxWidget, "QxTextField");
>>
>> The  cursor appeared, as can be seen here:
>>
>> http://m15s08.vlinux.de/~cboulanger/bibliograph-0.9/
>>
>> This helps for most situations, however, I still cannot select text 
>> in QxTextFields or QxTextAreas. Maybe there will be a part two to 
>> this saga.
>>
>> Cheers,
>> Christian
>>
>>
>> ------------------------------------------------------------------------- 
>>
>> Using Tomcat but need to do more? Need to support web services, 
>> security?
>> Get stuff done quickly with pre-integrated technology to make your 
>> job easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache 
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> qooxdoo-devel mailing list
>> qooxdoo-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>   
>
> ------------------------------------------------------------------------
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>   



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to