Title: Switching the focus of windows event Post by: erkin on February 13, 2018, 01:14:46 AM Hello!
I can somehow track the event by switching the focus of windows on the title? Title: Re: Switching the focus of windows event Post by: stworthy on February 13, 2018, 09:24:45 AM Try the 'click' event on the window header.
Code: $('#w').window('header').click(function(){ Title: Re: Switching the focus of windows event Post by: erkin on February 13, 2018, 11:35:57 PM Thank you!
Title: Re: Switching the focus of windows event Post by: erkin on February 14, 2018, 06:37:00 AM It works.
However, in fact the windows are switched over to mousedown event, not to click. But the mousedown event does not work in panel title element (<div class="panel-title panel-with-icon">), only in panel header container (<div class="panel-header panel-header-noborder window-header">). I get this event only at the edges of header container. And the click event does not always work by windows switching... Title: Re: Switching the focus of windows event Post by: stworthy on February 14, 2018, 08:36:48 AM Please try this code instead.
Code: $('#w').window('header').find('.panel-title').mousedown(function(){ Title: Re: Switching the focus of windows event Post by: erkin on February 15, 2018, 12:46:59 AM Unfortunately, this does not work.
My code is: Code: function onHeaderMouseDown () { Code: Uncaught TypeError: Cannot read property 'target' of undefined Code: Uncaught TypeError: Cannot read property 'show' of undefined Without a handler, everything works correctly. I use jQuery EasyUI 1.5.1, jQuery v3.1.0. Title: Re: Switching the focus of windows event Post by: stworthy on February 16, 2018, 05:23:33 AM This is the extended 'onActivate' event that is triggered when clicking on the window header.
Code: <script type="text/javascript"> Title: Re: Switching the focus of windows event Post by: erkin on February 16, 2018, 07:03:25 AM Thanks for the answer, it really works in most cases. :)
However, here we use the method onBeforeDrag. Dragging is not possible for all areas of the window title: in attached files it is seen. Dragging works for the central area of header, not for corners However, windows always switch over the entire header area. :'( |