Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Prohledat stránky podpory

Vyhněte se podvodům. Za účelem poskytnutí podpory vás nikdy nežádáme, abyste zavolali nebo poslali SMS na nějaké telefonní číslo nebo abyste sdělili své osobní údaje. Jakékoliv podezřelé chování nám prosím nahlaste pomocí odkazu „Nahlásit zneužití“.

Zjistit více

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''

Upravil uživatel the-edmeister dne

Všechny odpovědi (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.