-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to place text cursor in specific location within input field? #35
Comments
Meteorpad.com takes an interesting approach to editable text by using the hover event to trigger the input field. Then, a click simply places the cursor in the text area at the point of click. Would a similar strategy work for meteor-editable-text? |
In meteorpad.com, no events are triggered on the hover event -- that's just a cleverly styled As for the scenario you describe above, that absolutely shouldn't be happening. When you click on the selected text, there should be a cursor placed and you can edit as necessary. If you could put a repro on meteorpad, I'd be more than happy to look into what's going on. You're not using IE by any chance, are you? |
I will try to reproduce on Meteorpad. In the meantime, for reproduction, please consider checking the wysiwyg bootstrap 3 feature branch on our open-source project, called Crowducate. When editing a course, all inline editors on sidebar exhibit this behavior on Firefox 38. This may be related to the size of the input as a click click target, as the larger page elements such as titles behave as expected. |
It seems like this is related to our inline editable text being wrapped in anchor tags. On Firefox, the inline edit input doesn't behave as expected when rendered within an tag. |
Wrapping the editable text in anchor tags could certainly lead to some unwelcome side effects. I took a quick look at your repo for crowducate:
could be re-written as:
(Assuming that Could simplify the By the way, I really like where you're going with crowducate. Wish I had time to make some contributions. |
We have some editable text on our screen (without wysiwyg). On the first click event, the text becomes editable by inserting an input field, with all text selected. When I click a second time, with the expectation of placing a text cursor in a specific location within the text, the input field is removed.
E.g. I have the text 'editble' displayed in a paragraph on the page, which needs an "a" between "t" and "b". When I click the 'editable' paragraph, the input field appears, with all text selected. I then click between "t" and "b", so that I can add the correct letter "a" within the string. The result of the click removes the editable text area.
How can users place a text cursor in a specific location within an editable input field?
The text was updated successfully, but these errors were encountered: