Thank you, Hugh, for spending your time with my problem. - The problem with the error was easy to fix: a small bug in my eventListener. I overlooked this bug, because I only clicked with the mouse and never used the keybord.
- I agree, using of an external window (popup) is not a good solution. Many user have popup blocker activated. I had a try with a qx.ui.window.Window and qx.ui.embed.Iframe Combination to open the external url. That works for a fullscreen application. In my case the qooxdoo application itself is inside an iframe and there is not enough free space for a full browser window. Do you have an idea to solve this? I know, there are some tricks to by-pass popup blockers, but don't know if this could be a way. - My event problem: I played a little bit around with my event listeners. Now my table listens up to mouseup, and the combo makes it's action when a changeValue event occures. I thought, if I use e.stopPropagation(); and e.preventDefault(); the combo would eat the events, but that's wrong. I tryed these commands also in additional click, mousedown ond mouseup eventlisteners of the combo, but same result. Unfortunately I cannot find any description illustrating the use of stopPropagation and preventDefault. What do the really do? Hugh Gibson wrote: > >> Assuming that we have a widget like a combobox. If I want to select >> an >> entry, the popup of the combobox opens. I click on an ListItem. The >> combobox >> disappears. >> But the click event is not eaten. In my case it changes the active >> Row in a >> table, which is below the combobox. >> If you want to see this in action please have a look at here: >> http://www.fitnesswelt.com/shopajx.html - In the first field type in >> something, the table should be filled. Then you can try to change >> the >> listboxes. If you have your browser configured to allow open >> popups, you >> will se what I mean. > > It happens on the first click, when there is nothing selected in the > table. And then it only happens if you have just clicked on the selected > row (for example, select the second row and then click on it again). > > Also it only happens when the mouse is being released. If you do mouse > down, and hold it, the combo-box disappears and the table is reloaded but > nothing is selected in it. Then release the mouse and the first row is > selected. > > *BUG 1* The main issue would appear to be that qooxdoo should handle the > selection process in mouse up in the combo box, rather than mouse down. > Then the mouse up wouldn't be sent to the table that's underneath. > > Analysing the reason for the mouse up behaviour, we can see it by looking > at qx.ui.table.selection.Manager.js. handleMouseUp has this code: > > if (evt.isLeftButtonPressed() && !this._lastMouseDownHandled) { > this._handleSelectEvent(index, evt); > } > > But this._lastMouseDownHandled is only created when there has been a > mouse down event on the table. So it is "undefined" when the first > mouseUp event occurs. *BUG 2* - prevent this happening perhaps with > another flag to indicate that no mouse event has come through yet. > > Then in handleMouseDown there is code that affects > this._lastMouseDownHandled - setting it to false if a click is made on > the current selection (which is why the problem you see occurs when you > click on a row that is already selected). *BUG 3* - reset the flag in > mouseUp if you have clicked on a row that is already selected. > > There are some options to fix this: > > 1. rename this._lastMouseDownHandled to this._handleClickOnMouseUp which > also inverts the sense of it, so the test in handleMouseUp tests for > "true" rather than false. If it's true, then on MouseUp it's reset to > false. Then when it is undefined, or a mouseUp is made on the same table > entry (with no mouseDown), the flag is false and it doesn't result in a > select event. > > 2. Another way, which would fix the combo box problem as well, is to only > handle click events on mouse up anyway. That way the combo box would eat > the mouse up event. > > Option 2 is probably the best way of handling it as otherwise the > drag/drop functionality is probably going to be affected. > > > > I see another problem with your combo box - sometimes after dropping it, > and then using the up and down arrows to select an entry, then click on > another entry, it doesn't change to the clicked entry but uses the entry > selected on scrolling. There are lots of errors like this in the firebug > log: > > 2509500 ERROR: qx.event.handler.EventHandler[55]: Failed to dispatch key > event: TypeError - this.getComputedValue is not a function at > http://www.fitnesswelt.com/shopajx/script/shopajx.js:95 <snip> > > I suggest you look into all this a bit further, or if it's beyond you, > raise a bug report using my analysis. > > > By the way, I think it's a bit poor that you have to enable popups on > your site for the text from the selected table entry to show up, and then > that also means that your pop-under when the page is loaded is also > enabled. > > Hugh > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > -- View this message in context: http://www.nabble.com/combobox-and-event-question-tf4335283.html#a12384455 Sent from the qooxdoo-devel mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
