-
Notifications
You must be signed in to change notification settings - Fork 759
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
browser: accessibility: ensure to create only single instance #11137
Conversation
55ba625
to
0421a7c
Compare
0421a7c
to
d427406
Compare
@@ -414,7 +414,7 @@ var NotebookbarAccessibility = function() { | |||
|
|||
this.initialize = function() { | |||
setTimeout(function() { | |||
if (window.mode.isDesktop()) { | |||
if (window.mode.isDesktop() && !this.initialized) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about switching the mode few times?
tabbed interface -> compact interface -> tabbed interface
it will not be reinitialized again probably?
this is called in Control.UIManager.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possibly we need to "reset" it on switching to classic mode / closing tabbed interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about switching the mode few times? tabbed interface -> compact interface -> tabbed interface
it will not be reinitialized again probably? this is called in Control.UIManager.js
I have no idea, how coded/design here. I just saw an inconsistency here. It looks like a life cycle issue. I supposed
it is a singleton.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possibly we need to "reset" it on switching to classic mode / closing tabbed interface
The user can change dynamically user interface without reload?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, view -> compact mode / tabbed mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, you designed the control. I just did a quick fix, no depth analysis here, I have spotted a serious issue here. It is up to you guys to decide what is best.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it guards against muliple initialization of the class when switches to/from notebookbar mode multiple times.
Tested, it works. Thanks :)
I guess we can get this in unless Szymon has concerns.
Deleting the class instance and re-creating sounds like a better solution btw. It may prevent future issues. |
d427406
to
ecdef71
Compare
Yes, It is a definitive solution. Please add your patches when it is merged |
4f63f30
to
b3fe10f
Compare
#11193 has to go in first, then please rebase. Sorry about the trouble. |
Otherwise it will create a possible pattern: <div style="height: 0px; width: 0px; overflow: hidden;"><input type="submit" role="tablist" id="accessibilityInputElement" autocomplete="off" style="height: 0px; width: 0px;"></div> <div style="height: 0px; width: 0px; overflow: hidden;"><input type="submit" role="tablist" id="accessibilityInputElement" autocomplete="off" style="height: 0px; width: 0px;"></div> <div style="height: 0px; width: 0px; overflow: hidden;"><input type="submit" role="tablist" id="accessibilityInputElement" autocomplete="off" style="height: 0px; width: 0px;"></div> <div style="height: 0px; width: 0px; overflow: hidden;"><input type="submit" role="tablist" id="accessibilityInputElement" autocomplete="off" style="height: 0px; width: 0px;"></div> <div style="height: 0px; width: 0px; overflow: hidden;"><input type="submit" role="tablist" id="accessibilityInputElement" autocomplete="off" style="height: 0px; width: 0px;"></div> <div style="height: 0px; width: 0px; overflow: hidden;"><input type="submit" role="tablist" id="accessibilityInputElement" autocomplete="off" style="height: 0px; width: 0px;"></div> <div style="height: 0px; width: 0px; overflow: hidden;"><input type="submit" role="tablist" id="accessibilityInputElement" autocomplete="off" style="height: 0px; width: 0px;"></div> <div style="height: 0px; width: 0px; overflow: hidden;"><input type="submit" role="tablist" id="accessibilityInputElement" autocomplete="off" style="height: 0px; width: 0px;"></div> <div style="height: 0px; width: 0px; overflow: hidden;"><input type="submit" role="tablist" id="accessibilityInputElement" autocomplete="off" style="height: 0px; width: 0px;"></div> Change-Id: I54f09b50a0cef1f228c361ebefbd5b47cd35e2be Signed-off-by: Henry Castro <[email protected]>
b3fe10f
to
cafb478
Compare
Otherwise it will create a possible pattern:
Change-Id: I54f09b50a0cef1f228c361ebefbd5b47cd35e2be
Signed-off-by: Henry Castro [email protected]