Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

unselectable="on" isn't inherited #10

Closed
thomthom opened this issue Oct 24, 2012 · 6 comments
Closed

unselectable="on" isn't inherited #10

thomthom opened this issue Oct 24, 2012 · 6 comments

Comments

@thomthom
Copy link
Member

http://help.dottoro.com/lhwdpnva.php

Might need to catch and suppress the selection events with javascript.

Btw, #footer, which contains the TEXTAREA element - also is marked as unselectable - also in CSS. Won't this prevent selecting of the text input - if it was working?

@scottlininger
Copy link
Contributor

The challenge is getting consistency between various versions of IE that might be installed. It might be reasonable to document a minimal suggested IE version for the developer tools. If unselectable isn't inherited, perhaps the simple thing is to add it manually to the HTML for each subelement under #footer.

Point is, it's a better user experience to NOT allow the navigation bars, etc. to be selectable. So it'd be awesome to figure that out and test.

@thomthom
Copy link
Member Author

Yea, I agree it's nice to not have the UI selectable. I've been doing the same thing for my UIs. I've suppressed the drag/select events, with jQuery and set the cursor to make the UI appear like native.

Manually setting the property to each HTML element seem tedious and prone to errors.

I'll see what I can dig up.

@RichMorin
Copy link

On my (Snow Leopard) Mac, I was unable to copy text from the console (eg, into a text editor). This is a significant usability problem.

@thomthom
Copy link
Member Author

That's what a suspected since the parent to the textfield was marked unselectable.

@thomthom
Copy link
Member Author

This jQuery snippet works well: http://stackoverflow.com/a/9256483/486990

$(document).on('mousedown selectstart', function(e) {
    return $(e.target).is('input, textarea, select, option');
});

Not sure how to translate that to 'plain' JS though...

@thomthom
Copy link
Member Author

Similary, this will prevent the browser context menu on non-text controls:

$(document).on('contextmenu', function(e) {
  return $(e.target).is('input[type=text], textarea');
});

Tried it on my WebDialogs for TT_Lib and it's working fine in IE9 at least. The WebDialog behaves much more like a native window while preserving important drag,select and context menu for text controls.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants