Thank you for offering insight into this issue. Unfortunately, after
searching for this snippet of code 'document.onselectstart = function
() {return false;}'
I was not able to find anything. It does look like the .js file
culprit is named: jquery.ui.all.js

In it there is this: (I have tried deleting the whole thing, changing
text 'unselectable' to 'selectable' , off to on etc) with no
luck...any further suggestion or help would be appreciated.

/** Mouse Interaction Plugin **/

$.ui.mouse = {
        _mouseInit: function() {
                var self = this;

                this.element
                        .bind('mousedown.'+this.widgetName, function(event) {
                                return self._mouseDown(event);
                        })
                        .bind('click.'+this.widgetName, function(event) {
                                if(self._preventClickEvent) {
                                        self._preventClickEvent = false;
                                        return false;
                                }
                        });

                // Prevent text selection in IE
                if ($.browser.msie) {
                        this._mouseUnselectable = 
this.element.attr('unselectable');
                        this.element.attr('unselectable', 'on');
                }

                this.started = false;
        },

        // TODO: make sure destroying one instance of mouse doesn't mess with
        // other instances of mouse
        _mouseDestroy: function() {
                this.element.unbind('.'+this.widgetName);

                // Restore text selection in IE
                ($.browser.msie
                        && this.element.attr('unselectable', 
this._mouseUnselectable));
        },

        _mouseDown: function(event) {
                // don't let more than one widget handle mouseStart
                if (event.originalEvent.mouseHandled) { return; }

                // we may have missed mouseup (out of window)
                (this._mouseStarted && this._mouseUp(event));

                this._mouseDownEvent = event;

                var self = this,
                        btnIsLeft = (event.which == 1),
                        elIsCancel = (typeof this.options.cancel == "string" ? $
(event.target).parents().add(event.target).filter
(this.options.cancel).length : false);
                if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
                        return true;
                }

                this.mouseDelayMet = !this.options.delay;
                if (!this.mouseDelayMet) {
                        this._mouseDelayTimer = setTimeout(function() {
                                self.mouseDelayMet = true;
                        }, this.options.delay);
                }

                if (this._mouseDistanceMet(event) && 
this._mouseDelayMet(event)) {
                        this._mouseStarted = (this._mouseStart(event) !== 
false);
                        if (!this._mouseStarted) {
                                event.preventDefault();
                                return true;
                        }
                }



On Sep 20, 10:27 pm, RobG <robg...@gmail.com> wrote:
> On Sep 19, 6:53 am, amtames <matt.a...@tnmed.org> wrote:
>
> > Hi,
>
> > We recently had our site redeveloped by a professional firm. We
> > originally requested that users not be able to copy and paste text
> > from our site. This has created an outcry and we would like to have
> > text be selectable. I see that they achieved this by using jquery
> > which I am not familiar. I believe that I have found the snippet of
> > code that turns this ability off/on but I do not know how to write the
> > correct code to allow selection of text.
>
> You don't have to do anything to *allow* selection of text, you just
> have to stop trying to prevent it. The simple solution is to turn off
> javascript, but likely your users don't know how to do that.
>
> > This is an IE specific issue,
> > not a problem in Firefox.
>
> Look for something like:
>
>   document.onselectstart = function() {return false;}
>
> and remove it.
>
> --
> Rob

Reply via email to