0

I have most of my web-app set as unselectable. Using div as an example:

div {
    -webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

The amazing thing is that I can still select most of the page by starting the select along the left edge-- the DOM inspector tells me I'm selecting outside of any DOM element itself, and am selecting from inside the top level HTML element. I tried being silly and setting it as:

html {
    -webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

...which yielded no effect. I'm being a perfectionist here, but at this point I'm just curious-- how can you disable this entirely? The body is already 100% width. I don't understand why I can click outside it.

Also, this only happens in Firefox.

temporary_user_name
  • 35,956
  • 47
  • 141
  • 220

1 Answers1

0

Throw a div as an overall wrapper use absolute positioning with negative top bottom left and right say -150 top -150 bottom then padd the content back in with 120 120 use a scroll top observer or add a sliding header and the additional 60 of space can function as default animation when there is a collapse (switching padding to margining

It should work but can be a pain in the neck if you aren't using the extended regions for headers layering or images.

Hope it helps.

Sincerely

Jason