Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

Mouse can't place cursor in input field that is prepopulated with data

more options

When I click my mouse in a pre-populated form text input or textarea field, the cursor goes to the beginning of the input content and I cannot move it with my mouse. I am also not able to highlight any text with the mouse.

I can move it and edit it with my arrow keys and the delete buttons.

The site uses Angular.JS and Swig template frameworks in a Node/Express/Mongo stack.


moderator fixed the misspellings in the title of this thread

When I click my mouse in a pre-populated form text input or textarea field, the cursor goes to the beginning of the input content and I cannot move it with my mouse. I am also not able to highlight any text with the mouse. I can move it and edit it with my arrow keys and the delete buttons. The site uses Angular.JS and Swig template frameworks in a Node/Express/Mongo stack. ''moderator fixed the misspellings in the title of this thread''

Променено на от the-edmeister

Всички отговори (5)

more options

Is the field <input type="text"> or <input type="date">? I don't think Firefox currently supports <input type="date"> fully/correctly and libraries that use it as a kind of shorthand for styling/scripting may run into some glitches. https://developer.mozilla.org/docs/Web/HTML/Element/Input#Browser_compatibility

more options

The fields are text as well as text area. We don't have any date fields. The forms themselves are managed by Angular templates that are hidden or shown based on Swig conditionals.

It works fine in Chrome, Safari and IE... as well as anything works in IE I guess.

Firefox is the only one that has issues.

One item to note is that the data in the fields is being added via Angular, so it is seeding the fields on page load from a JSON object that has the data in it. This is the last thing that happens, but it seems like the fields are acting like they are empty on mouse focus, but not with keyboard commands.

more options

Do you have a demo page up or does the library have a demo page?

If not, could you right-click > Inspect Element (Q) on the field to open the inspector. On the right side, click "Computed" and scroll down to the end and look for this:

-moz-user-select

with a value of either:

none
-moz-none

If you find one of those, a CSS rule is blocking mouse selection.

more options

Thanks for your reply! I actually don't see the -moz-user-select in the options. The last few are:

-moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-right-colors: none; -moz-border-top-colors: none;


So it isn't even showing that it is selected. I am including a screen shot so you can see.

more options

I'm not sure the inspector is working correctly, it doesn't show any type attribute (e.g., type="text") for the input. Maybe it was set in a script instead? Strange.