Vaadin AceEditor focus issues - focus

I have recently downloaded the AceEditor Add-On for Vaadin (http://vaadin.com/addon/aceeditor) and i have a few issues with it, i hope you can help me out!
The first issue is that the ValueChangeListener of the AceEditor is called in every typing event (just like the TextChangeListener), and NOT just when the area looses focus, like in a regular TextArea.
I need a listener that would be called only when the AceEditor looses focus. i have also tried to add a BlurListener to this component, but it is also not working... any suggestions?...
The second issue is also related - when i press the TAB key inside the AceEditor, it just adds a TAB to the text instead of changing focus.
I've tried adding a shortcutListener with KeyCode.TAB but it didnt work... i also tried adding a shortcutListener to the whole Panel. didnt work either. any suggestions about that?...
Thank you!!

Thank you so mucn #Jens Jansson !
The new merge worked!

Related

Why does Android ViewPager2 looses focus when switching between tabs?

I have a ViewPager2 on my Android App. One of the pages contains an EditText field.
The scenario I encountered is as follows:
Set focus on the text field -> keyboard shows
Switch to another page -> keyboard dismisses (the field lost focus)
Go back to the previous tab and set focus on the text field again -> the field will gain focus but immediately the focus would clear. Tapping on the field again will get the focus back.
I prepared a small demo app to demonstrate this issue: https://github.com/hilaza/SwitchTabsBugDemo
I debugged it and what I found was that the ViewPager clears the focus from my page, thinking that a page was selected. Debugging it further I saw that it has something to do with the RecyclerView's didChildRangeChange method which wrongly assumes that something has changed.
Does anyone happen to know why it's happening and what can I do to work around this?
This is a strange bug happens because of Recycler behaviour. Unfortunately, cannot explain why it happens, but know for sure that this row might help you:
pager.offscreenPageLimit = 1
Or the equivalent in Java. This may help because it disables some of Recycler behaviour. Will be happy if someone explains it better. Faced the same issue and resolved it with this one.

Add html toggle button PrimeNG p-editor

I have added PrimeNG p-editor on my angular 7 application but wanted to add custom button to toggle on HTML and text view as this feature is not supported by primeNG/quill. Also went through this issue thread https://github.com/quilljs/quill/issues/128 but unable to find out the required answer.
I looked into multiple examples like
https://jsfiddle.net/nzolore/1jxy58vn/ and https://codepen.io/anon/pen/ZyEjrQ but all this is in javascript and unable to convert it in angular.
I have added <button class="ql-edit-html">html</button> under <p-header> but not getting next part.
any help will be appreciated. Thanks :)
We faced the same problem one week ago. Maybe we didn't fix it as you wanted. It's some kind of workaround.
We've added button under p-editor which is replacing quill with normal textArea.

Unable to Dragend Navigator handles in HighStock

I am using a 'spline' chart type in HighStock. The problem is that when I start using either side handles on the Navigator, I'm not able to stop dragging and the handles get stuck with the mouse cursor. I've tried replicating the issue on JSFiddle but it works fine there. Since it's proprietary data I'm playing with, I cannot really post any code. But I do hope that I have made my question pretty clear. If there's anything else I can add, do let me know.
The problem was that MouseUp DOM event was not firing. I got to know this when I used setExtremes event for xAxis. Then, I looked around and found that I had a $('html').on('mouseup') somewhere in another js file messing it all up.
Removed the mouseup event written on html and voila, it worked :)
Thanks to everyone who gave a thought to this.
Cheers!

PhpStorm 6.0.1 - Shortcut to save activates search bar

So i got the following problem. When I'm working inside the editor and press STRG + S (what should be save) the document gets saved, but what happens also is, that a search bar gets popped up and the next thing I write get's written into the search bar instead of the editor itself. I then have to click into the editor again to write there. This is pretty annoying since I save quite a lot. In the Keymapping STRG+S is set for Save all, so this doesn't make really sense for me.
As a comparison here two screenshots. The first one shows how it looks like, when I write something and didn't save yet. The second one shows what happens, as soon as I press STRG+S
As you can see a search bar pops up and gets the focus of the cursor. This is what I'm trying to solve but can't find a solution for.
Update to the latest version, 6.02, your problem should be solved.

Using codemirror in jquery.ui.dialog loses focus onload

i try to use codemirror in a jquery ui dialog.
here you can see the result in jsfiddle.
http://jsfiddle.net/HtntY/
the problem is that the content in codemirror does not appear on first load. it only appears after you set focus on the editor and than type something, after that the preloaded content appears.
can this be fixed somehow. i tried to do it with the refresh() function without success.
thanks for you short time.
Looks like jQuery UI hasn't actually unhid the DIV when the opener runs. Putting a refresh call in a timeout (as in http://jsfiddle.net/NP9SL/ ) seems to do the trick.
I ran into the same problem and wound up running the editor.refresh() off the focus event, FWIW. I thought I'd mention another, somewhat related problem. If you try to take advantage of the CodeMirror dialog/search functionality inside of JQueryUI modal dialog, the integrated search dialog fails to get focus and you can't type into it. Interestingly I can paste text into the search field, but I cant type. Have yet to find a way around this other than setting modal to false.

Resources