简体   繁体   中英

Can't select forms in Firefox?

http://jsfiddle.net/gBG65/4/

In emulation of my actual project, here we have a text input within a div. The div and everything else in it must be unselectable , hence its CSS. But the form ought not to be that way, hence its CSS, yet it is anyway. Even though if I inspect the element, it inherited everything correctly and ought to be working, it is still unselectable.

This is Firefox only.

Any explanations or fixes?

div * {
    -moz-user-select: -moz-none;
    cursor:default;
}

input {
    cursor: auto;
    -moz-user-select: -moz-user-select:text;
}

If you read the docs

You can see it is -moz-none;

And to re-enable use: -moz-user-select: text;

Also remove the * ...

Example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM