selection text on straight HTML

View: New views
7 Messages — Rating Filter:   Alert me  

selection text on straight HTML

by simoms :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In the page, I only add the qooxdoo component in the div, and using qx.ui.basic.Inline add it to existing html.
the page similar as  http://www.fitnesswelt.com/fitness-shop/ 

but the problem is when using qooxdoo, the selection and copy function is disabled. I need to active the selection and mouse right click function, how can i do?

Thanks,
Simon

Re: selection text on straight HTML

by Alexander Back :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Simon,

the reason for this behaviour is the CSS property "MozUserSelect" which
is set by several widgets (including the table, exactly the default
headerRenderer class) to "none". It seems, that Gecko is setting the
property at the body element (-> "-moz-user-select:none") and this
prevents any selection on the whole page.
Unfortunately you cannot set this property on element level to enable
user selection on specific elements and leaving all other elements
untouched, because this is still a bug in the gecko engine.

So the only possible workaround could be to manually set the property at
the body element after the page finished loading. I've just experimented
with it using the Firebug extension (this way you can enable/disable CSS
properties on the fly) and if you dynamically remove the CSS property at
the body element the text inside the HtmlEmbeds are selectable.

Hope this helps,
   Alex

simoms wrote:

> In the page, I only add the qooxdoo component in the div, and using
> qx.ui.basic.Inline add it to existing html.
> the page similar as  http://www.fitnesswelt.com/fitness-shop/ 
>
> but the problem is when using qooxdoo, the selection and copy function is
> disabled. I need to active the selection and mouse right click function, how
> can i do?
>
> Thanks,
> Simon

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@...
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Re: selection text on straight HTML

by simoms :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks alex and detailed information,
Is the only method using  Firebug extension? I am not prefer this, because impossible need user to do that. any javascript or method can I do with enable selection?

also I want to know the detail with alex said " if you dynamically remove the CSS property at
the body element the text inside the HtmlEmbeds are selectable"

Thank you everyone's help!!


Alexander Back wrote:
Hi Simon,

the reason for this behaviour is the CSS property "MozUserSelect" which
is set by several widgets (including the table, exactly the default
headerRenderer class) to "none". It seems, that Gecko is setting the
property at the body element (-> "-moz-user-select:none") and this
prevents any selection on the whole page.
Unfortunately you cannot set this property on element level to enable
user selection on specific elements and leaving all other elements
untouched, because this is still a bug in the gecko engine.

So the only possible workaround could be to manually set the property at
the body element after the page finished loading. I've just experimented
with it using the Firebug extension (this way you can enable/disable CSS
properties on the fly) and if you dynamically remove the CSS property at
the body element the text inside the HtmlEmbeds are selectable.

Hope this helps,
   Alex

simoms wrote:
> In the page, I only add the qooxdoo component in the div, and using
> qx.ui.basic.Inline add it to existing html.
> the page similar as  http://www.fitnesswelt.com/fitness-shop/ 
>
> but the problem is when using qooxdoo, the selection and copy function is
> disabled. I need to active the selection and mouse right click function, how
> can i do?
>
> Thanks,
> Simon

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Re: selection text on straight HTML

by Jonathan Rass :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Simon!


You can remove a CSS property by the DOM API:
document.body.style.removeProperty("-moz-user-select");


Regards,
Jonathan

-----Original Message-----
From: qooxdoo-devel-bounces@... on behalf of simoms
Sent: Fri 7/18/2008 3:56 AM
To: qooxdoo-devel@...
Subject: Re: [qooxdoo-devel] selection text on straight HTML
 
also I want to know the detail with alex said " if you dynamically remove
the CSS property at
the body element the text inside the HtmlEmbeds are selectable"


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@...
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

winmail.dat (3K) Download Attachment

Re: selection text on straight HTML

by simoms :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jonathan,
I am sorry that the method does not work.
I am using the external style sheet, is it related?

Simon
Jonathan Rass wrote:
Hi Simon!


You can remove a CSS property by the DOM API:
document.body.style.removeProperty("-moz-user-select");


Regards,
Jonathan

-----Original Message-----
From: qooxdoo-devel-bounces@lists.sourceforge.net on behalf of simoms
Sent: Fri 7/18/2008 3:56 AM
To: qooxdoo-devel@lists.sourceforge.net
Subject: Re: [qooxdoo-devel] selection text on straight HTML
 
also I want to know the detail with alex said " if you dynamically remove
the CSS property at
the body element the text inside the HtmlEmbeds are selectable"

 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Re: [SPAM] Re: selection text on straight HTML

by Jonathan Rass :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Simon,


could you try this little test script: http://mysterycity.de/blog/sandbox/gecko_user_select.html? You should be able to select the text after clicking the button.

You can search for for "-moz-user-select" in your style sheets, but I think it would be quite unusual if there were such entries.


Cheers,
Jonathan


-----Original Message-----
From: qooxdoo-devel-bounces@... on behalf of simoms
Sent: Tue 7/22/2008 5:06 AM
To: qooxdoo-devel@...
Subject: [SPAM] Re: [qooxdoo-devel] selection text on straight HTML
 

Hi Jonathan,
I am sorry that the method does not work.
I am using the external style sheet, is it related?

Simon


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@...
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

winmail.dat (4K) Download Attachment

Re: [SPAM] Re: selection text on straight HTML

by simoms :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, Honathan
Your sample page is work, and i tried apply to my qooxdoo page, it work with bottom. But I tried to put the script in the end of the page, it not work. How can I know the page is loaded and auto run the script?
also, It is not enable mouse right click, I need to using the copy function on right click, how can I do?

Thanks for your help
Simon
Jonathan Rass wrote:
Hi Simon,


could you try this little test script: http://mysterycity.de/blog/sandbox/gecko_user_select.html? You should be able to select the text after clicking the button.

You can search for for "-moz-user-select" in your style sheets, but I think it would be quite unusual if there were such entries.


Cheers,
Jonathan


-----Original Message-----
From: qooxdoo-devel-bounces@lists.sourceforge.net on behalf of simoms
Sent: Tue 7/22/2008 5:06 AM
To: qooxdoo-devel@lists.sourceforge.net
Subject: [SPAM] Re: [qooxdoo-devel] selection text on straight HTML
 

Hi Jonathan,
I am sorry that the method does not work.
I am using the external style sheet, is it related?

Simon

 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel