Skip to content
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

textarea auto focused and insert first image not work #25

Open
williamherry opened this issue Nov 1, 2014 · 5 comments
Open

textarea auto focused and insert first image not work #25

williamherry opened this issue Nov 1, 2014 · 5 comments

Comments

@williamherry
Copy link

Hi, I find some weird thing about this directive plugin, don't have this issue if I directly use redactor

I am use redactor on a textarea within a modal, when model show up, that textarea is focused, I mean the cursor is blink, if start input, everything is find, but if I click one time and then input, the inputed text will go to next line, click multi time have so such issue

another issue is the first image inserted into not show up, I am feeling this two issue are related, how can I not make this textarea focused?

@samvloeberghs
Copy link

you could try the focus option:
focus: true => focus : false?

From their website ( http://imperavi.com/redactor/docs/settings/focus/#setting-focus ) :
By default, Redactor doesn't receive focus on load, because there may be other input fields on a page. However, to set focus to Redactor, you can use this setting.

Perhaps you set it to focus somewhere? So explicitly state not to focus.

Just my first thougts :)

@wiliame
Copy link

wiliame commented Nov 15, 2014

I updated from bower version to this new version and autofocus appeared. Well, and placeholder disappeared too.

@wiliame
Copy link

wiliame commented Nov 15, 2014

Well... thats because of the "insert.set" fix, I fixed it checking first if the value is empty, but maybe it will be better to set the value without autofocussing it.

if(ngModel.$viewValue) { $_element.redactor('set', ngModel.$viewValue || ''); }

@lanocturne
Copy link

I have same auto focus issue like wiliame mentioned. If you put focusCallback fn on the scope config, you may find the callback gets called after redactor is initialized. Also yes, I set focus: false.

@venkat290
Copy link

i had a same focus issue.how to focus last cursor position in redactor using jquery.

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

No branches or pull requests

5 participants