Jquery Select2 multiselect with Dragon NaturallySpeaking - jquery-select2

I have implemented a select2 multiselect for list of states in a application, and it works fine using typing the state names. But with Dragon NaturallySpeaking software if you speak in select2 to select a state, it only show the last char of what you spoke and do not autosearch, you have to press space to see the whole text and then press backspace to start the search, looks like some event does not fire when you speak than type. Not sure if there is any solution that I can try. I have tried to fire the change event manually.. but not working !

Since the select2 box is not Select and Say, you probably need to dictate into the dictation box and transfer it over. Or, write a script to take in the dictation, convert it to what you need, and then paste it to clipboard. Then go over to box and paste from clipboard. Let us know what worked . . .

I have added a check if the selected element class is select2-search__field then I trigger a $(activeElement).trigger('change') in that element. that seems doing the job

Related

SELECT: getting event on onChange

I built a table with a column with a " linked multiselect" filter, where the options of the second select depend on the first selection, and so on.
The problem is that as soon as I select an item, the filter dropdown close. I would like to close the popup when I finished all the selection.
I thought to intercept the onchange event in order to stop the propagation of the event. But it seems it's not possible.
Another option is to intercept the onClick event on the <option>, I tried but it didn't work.
Example:
https://codesandbox.io/s/8498m8ykxj
Luca
The popup container of the select (the options) is outside the filter dropdown.
Moving it inside (Select.getPopupContainer) solved the problem.
https://codesandbox.io/s/8498m8ykxj
I don't want to be that guy that does not understand what you are doing and gives advice. But if you need a multiple select, I would suggest to use a "multiple selection" input as you can find in the antd doc.
An other solution would be to use a Menu with chehkbox for each item. I think it would be much more easy to use.
That is just an idea.
Have a good day anyway

How to preselect capslock in TouchKeyboard component

I am working with Delphi TTouchKeyboard component. Because in later use people will mainly use capital letters, I would like to preselect capslock.
My problem now is, that the Touchkeyboard only changes its key caption when I click directly on a key. If the state is toggled by an (external) keydown message, one can use capital letters, but the keyboard component will still dislpay small letters on the keys. How could I solve that?
As far as I can see the only work arround is to edit the original source code.
http://qc.embarcadero.com/wc/qcmain.aspx?d=88770 (I haven't tested it)
I've tried to write a patch with this code but with out any luck because I can not acces the private field Fbuttons.
So if you want this you'll have to patch the original code

Devexpress : Express Printing System - Print contents of 2 cxgrid's

Actually, I never tried this but it's supposed to work judging from some comments I've read. I have two grids: One displays Hotel guests and the other one their former stays (Date from- date to, etc..). Now I would like to be able to print both contents as a single report.How do I add the linked contents of the second grid to my dxComponentPrinter1Link1 ??
In the IDE open your form.
Right click and choose ReportLinks on the TdxComponentPrinter
object.
In the links editor window, instead of clicking the Add button, click the dropdown arrow next to the Add button. Choose Add Composition.
This creates a TdxCompositionReportLink object. There is an Items property which will hold all of the report links you want in the composite report. This will print out as a single report. I can't promise both reports will be on the same page though. I've never figured out how to do that.

Primefaces p:autocomplete component doesnot works under dialog box

I am using primefaces p:autocomplete component (primefaces version 3.0), its working fine , but I am getting 2 issues with it.
First is when I am puuting p:autocomplete component inside dialog box ,and if a user gets suggestions after some typing keywords, it stuckes, neither we can type anymore nor we can use backspace .
Second is p:autocomplete component suggestions are case sensitive.But user should get always suggestions whether he didnt used capital letters.
As a e.g: if a name is stored in database as "John" with capital letter, but if a user type 'jo' with small case letter he should get suggestion as a "John".
How can I solve it?
I don't have a specific answer for your first part. Possibly a PF bug. Is it just the autocomplete that sticks? Does the whole browser hang? Are you able to use other controls on the page?
As for the case sensitivity, you would control that in your autocomplete method on the backing bean. If you want to ignore case, use .toLowerCase(), .toUpperCase(), .equalsIgnoreCase() in your compare.

jQuery: how to go into sort mode, get out of it, apply order, and cancel sort?

I want the user to be able to trigger sorting mode. It's because I find that with long lists, updating takes long. If updating the position happens every time an item is dropped, it'd be slow and expensive.
This means that when they trigger the sorting mode, let's say by clicking on Start sorting, that's when I apply the .sortable(...) to the list I want them to sort.
My problem lies in these:
How do I disable the automatic update after everytime an item is dropped?
If the user decides that they don't want to sort it after all, how do I cancel it?
Thanks!
If you have a button that you want to use to "Start Sorting" the sortable, I would recommend this approach, assuming you have a DIV with an ID of "MyList"...
On document load or Init, create the sortable and deactivate it...
$(init);
function init() {
$("#MyLIst").sortable();
$("#MyLIst").sortable("disable");
}
Then when the user clicks the "Start Sorting" button...
$("#MyLIst").sortable("enable");
At this point I would prefer to change the "Start Sorting" button to "Finish Sorting", and when this button is clicked...
$("#MyLIst").sortable("disable");
I know this is an old question so I point out that this uses the latest JQuery as described here. I am not sure what the minimum version is that would allow for this to work.

Resources