EasyUI Forum
December 10, 2025, 11:48:22 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Setting Tab property with update() steals the current element focus  (Read 7090 times)
devnull
Sr. Member
****
Posts: 431


View Profile
« on: May 19, 2015, 07:57:51 AM »

OK, I know that the first thing you will do is to ask me to vew a jsfiddle that proves there is no problem, but there is a problem and I have tried several times to resolve it.

In my app which has multiple levels of panels, tabs etc etc, when I include a multiline textbox, it does not like carriage returns.

if you enter a carriage return more than once, it will loose focus immediately, I suspect that it has something to do with the css whitespace property but if I create a simple jsfiddle I just cannot replicate the problem.

I have no event listeners on keydown or keyup listeners so it's got be something to do with easyui, but as I am unable to replicate the problem in jsfiddle I am now stuck !

Also, in Firefox, multiline textboxes do not show carriage returns, newlines, it is all 1 block of continuous text, but in Chrome the newlines are displayed correctly.
« Last Edit: May 21, 2015, 12:26:24 AM by devnull » Logged

-- Licensed User --
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #1 on: May 21, 2015, 12:25:38 AM »

Ok, finally found the cause of this.

The tabs.update() method removes the focus from the current input element.

I have a multi-line textbox, that updates it's parent tab onChange, and when you hit a carriage return to move to the next line, instead of moving to the next line instead it fires the change event which updates the tab and takes focus away from the multiline text box - so you can only ever enter 1 newline withiut refocussing on the text box again.

No that I know, this can of course be overcome by resetting the focus back to the textbox, but it would be nice if the tab.update() event did not steal the focus.

I have adjusted the subject to reflect the cause.

Logged

-- Licensed User --
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!