How to change click behaviour in textarea so that it shows cursor position and doesn't select a character? - textarea

I have a textarea and when I run on one machine, clicking does this:
and on the other it does this:

Related

Weird behavior for textarea in diagrams.net (draw.io) format panel

I'm facing a very weird (& blocking) issue using diagrams.net webapp.
I'm trying to add some nodes in the Format Panel. I created a new tab in this panel & added in it some new inputs.
There are text inputs, checkbox inputs & textarea.
But the behavior is absolutely not the expected one.
For text & cb inputs, everything works fine, but textareas behavior is... at least very weird:
The field can't get focus by mouse clicking (remember that click works on other inputs). The only way to set the focus on it is by using JS focus() method.
Text inside the tag can't be selected by mouse. If element has the focus, text can be updated. Moreover, even if text can be changed, text cursor cannot move from the end of the text.
Textarea box is not resizable. There is the bottom-right arrow to resize it & I added the "resize" value to be sure but the feature doesn't disable but I juste can't. BUT ! If I set the attribute "disabled" then I can resize the box. Unfortunately, I can't disable the textarea since I want to put it because I need to write in it.
I can't show you code for now (it's just a new node creation using document.createElement) but you can easily test this: go to drawio webapp & when the webapp is loaded, use the Inspector in the developer tools to add a new textarea node in the format panel (div with ".geFormatContainer" class) : element is not focusable with the mouse, text inside it is unselectable & box is not resizable as long as "disabled" attribute is not set.
I added a click listener in the component to check if click did something & it does, but it doesn't give the focus to the element (document.activeElement says that body is focused -_-) so I think there is something in mxgraph which avoids the element's classic behavior. But what ?

How to set keyboard hover in select2

How to set keyboard hover in select2. I have mouse hover and work fine, but keyboard no? When i use arrow down and press enter he select secound element and thats work fine, but no hover effect.

Selection of Popup Button clearing UI Text Field

I've been developing a programming where the user can select a list of fields from popup buttons, then they press a calculate button and then depending on the choices, a string of text gets outputted to a UIText Field.
However I would like for the text field to be cleared when the user starts selecting other choices in the popup button before pressing the select button.
Is there anyway this is possible?
Just right this code in the place where that happens:
/*You can replace theTextFieldYouAreTalkingAbout with the one you are talking about*/
theTextFieldYouAreTalkingAbout.text = ""

How to remove this text box?

How do i remove this text box from my excel table ? If i try to write something in that box, it overlap the next cell, but i can write in that box but it has a limited number of character,so if i write more than 11 characters, my box will have the same size, but the text will be pushed.
- the box
- more than 11 characters
I don't know how it appeared but i would like to remove it . Thanks.
Right-click in the textbox and from the context menu, pick Delete

JQuery UI Autocomplete, not selecting a value on enter if mouseover

I have a problem with JQuery UI Autocomplete.
I want it to behave like this:
If I have positioned my mouse right under the input and entering values, so the autocomplete appears and press enter, the script will select the value from the autocomplete list. I'd rather want the script to just close and select the user entered value.
In short form: I want autocomplete just to replace the input text if a user actually clicks on a suggestion.
Is this possible somehow?
Best Regards
You can play with the select event:
select : function(event, selectedObject) {
jQuery(this).val(selectedObject.item.value);
}

Resources