-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attachBrowserEvent is triggered twice #240
Comments
Hi Martin, However, the straightforward deduction that onAfterRendering is called twice here does not apply. It is only called once (otherwise it would in fact be a performance bug). However, this means that I don't have an explanation yet why your listener is called twice when attached in onAfterRendering... This needs further analysis. Andreas |
Hi Andreas, |
Hi Martin, Andreas |
Ok, the issue is that the browser event handlers are detached before rerendering and re-attached after rendering. However, when you register in onAfterRendering, the handler is 1.) immediately attached and 2.) re-attached by the RenderManager, so this is where the duplicate registration comes from. This is indeed a bug. Thanks for spotting this! |
it's happening again in v.1.40.8... I simply put a console.log inside onAfterRendering and it's called twice. |
Is |
simply something like this: |
Well, that's most likely normal behaviour. See #1162 (comment) for a description of the rendering process. As explained there, any control (or view) might be rendered multiple times if there are updates to its configuration. If you think there is indeed a problem, we need a more detailed description of the scenario, ideally as a JSBin. And if so, I would propose to open a new issue as yours seems not to be immediately related to the duplicate |
My case is: I use an XML view with some native html elements in it (using xhml namespace), and then I'll use some 3rd party plugins on those elements. However those elements got inited again when the view is re-rendered. Is there any solution to achieve this? |
Moreover I am confused that when I use a IconTabBar to switch between tabs, the tab content got re-rendered again but no onBeforeRendering or onAfterRendering event is sent... |
Hello UI5-Developers,
I've got the problem, that every
keydown
event is triggered twice.Please take a look at the short example.
JSBin
Always when you press one key, the counter
cntr
variable is increased 2 times.Do you have any idea, how to fix this?
Thanks for your help.
Greetings
Martin
The text was updated successfully, but these errors were encountered: