Abhay Jain
Top achievements
Rank 1
Abhay Jain
asked on 23 Dec 2010, 10:39 PM
Hello,
I am observing a typical behavior on closing the RadSpell dialog box.
Steps to replicate the issue:
I am using RadControls Q3 2008. I have tried the above scenario on the IE8 browser.
Thanks.
~Abhay
I am observing a typical behavior on closing the RadSpell dialog box.
Steps to replicate the issue:
- Open the RadSpell dialog box.
- Ensure that the text box that it is trying to spell check has at least one invalid text entry (as per the dictionary used).
- Now, close the spell check dialog box before it shows the valid suggestions for the incorrect entry (as per the dictionary used).
- The browser would then show the following java script error: "Error: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."
I am using RadControls Q3 2008. I have tried the above scenario on the IE8 browser.
Thanks.
~Abhay
8 Answers, 1 is accepted
0
Hello Abhay Jain,
You are using a very old version of RadSpell. Are you able to reproduce the problem with the latest one in the following live demo: http://demos.telerik.com/aspnet-ajax/spell/examples/whatsnew/defaultcs.aspx?
If the problem is not reproducible, our recommendation is to upgrade to Q3 2010 SP1 (ver. 2010.3.1215).
Best regards,
Rumen
the Telerik team
You are using a very old version of RadSpell. Are you able to reproduce the problem with the latest one in the following live demo: http://demos.telerik.com/aspnet-ajax/spell/examples/whatsnew/defaultcs.aspx?
If the problem is not reproducible, our recommendation is to upgrade to Q3 2010 SP1 (ver. 2010.3.1215).
Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Abhay Jain
Top achievements
Rank 1
answered on 24 Dec 2010, 06:50 PM
Thanks for replying Rumen.
~Abhay
- I tried to reproduce the issue using the live demo. The thing is, on the live demo page, the time that it takes to perform the spell check and to show the suggestions is so less that I can't close the dialog box before the suggestions are displayed. This is a vital step to replicate the issue. Moreover, we're not using the English dictionary. Instead, we're employing a medical dictionary.
- Due to the nature of the project and it being live and running, we can't update the version of Telerik RadControls as we're wary of the adverse effects, that upgrading would have. Kindly let me know if there is any other way of eliciting support for the older version.
~Abhay
0
Hi Abhay,
My suggestion is to hide the close [X] titlebar button on the Spell dialog and prevent the dialog closing from it. You can do that using the following CSS class:
Best regards,
Rumen
the Telerik team
My suggestion is to hide the close [X] titlebar button on the Spell dialog and prevent the dialog closing from it. You can do that using the following CSS class:
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
<
style
type
=
"text/css"
>
.rwCloseButton { display: none !important; }
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"ScriptManager"
runat
=
"server"
></
asp:ScriptManager
>
<
telerik:RadSpell
ID
=
"RadSpell1"
runat
=
"server"
ControlsToCheck
=
"TextBox1"
/>
<
asp:TextBox
ID
=
"TextBox1"
runat
=
"server"
>das dasdas das asd</
asp:TextBox
>
</
form
>
</
body
>
</
html
>
Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Abhay Jain
Top achievements
Rank 1
answered on 29 Dec 2010, 09:10 PM
Thanks Rumen.
I understand what you're saying. But there should be a way for the user to close the dialog once the suggestions are displayed. How would the user close the dialog otherwise?
(1) Ideal way should have been, to extend your suggestion, to hide the CLOSE button and show it immediately after the suggestions are listed. Is there any client side event that is generated when suggestions are displayed that I could handle to hide/show the CLOSE button?
(2) Another alternative can be: on the ClientDialogClosing event we stop the spell check completely thus preventing it to bring focus to the invisible suggestions that is the cause for the java script error.
I understand what you're saying. But there should be a way for the user to close the dialog once the suggestions are displayed. How would the user close the dialog otherwise?
(1) Ideal way should have been, to extend your suggestion, to hide the CLOSE button and show it immediately after the suggestions are listed. Is there any client side event that is generated when suggestions are displayed that I could handle to hide/show the CLOSE button?
(2) Another alternative can be: on the ClientDialogClosing event we stop the spell check completely thus preventing it to bring focus to the invisible suggestions that is the cause for the java script error.
0
Hi Abhay,
The provided css class just hides the x button on top right corner of RadSpell dialog. There is another close button in the RadSpell dialog itself, which your user can click to close the dialog. This inner close button is loaded with the rest of the dialog content, so your users will be unable to click it before the full load of the dialog.
You can see how the suggestion works in the following video: http://screencast.com/t/pOAqLgiV.
Is the problem reproducible with the internal Cancel button?
The available events for RadSpell are listed here: http://www.telerik.com/help/aspnet-ajax/spell_clientevents.html.
Best regards,
Rumen
the Telerik team
The provided css class just hides the x button on top right corner of RadSpell dialog. There is another close button in the RadSpell dialog itself, which your user can click to close the dialog. This inner close button is loaded with the rest of the dialog content, so your users will be unable to click it before the full load of the dialog.
You can see how the suggestion works in the following video: http://screencast.com/t/pOAqLgiV.
Is the problem reproducible with the internal Cancel button?
The available events for RadSpell are listed here: http://www.telerik.com/help/aspnet-ajax/spell_clientevents.html.
Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Abhay Jain
Top achievements
Rank 1
answered on 27 Jan 2011, 11:47 PM
Hi Rumen,
The problem that our users face is reproducible with both the Cancel and Close buttons.
The issue is not that the users click the Cancel/Close button before the dialog gets loaded completely. The problem happens when the spell check has begun and then the user closes the dialog. Due to this, when the spell check web service returns with the suggestions, there is no place (since the dialog was closed/hidden) for them to be displayed. Now, at this point if the JS code tries to bring the focus to the first suggestion, the browser cribs because the control that is being tried to focus upon is hidden.
Thus as I suggested in one of my earlier posts, I can only think of the following ways to avert the problem but due to lack of proper events, I am not able to even achieve that.
(1) Ideal way should have been, to extend your suggestion, to hide the CLOSE button and show it immediately after the suggestions are listed. Is there any client side event that is generated when suggestions are displayed that I could handle to hide/show the CLOSE button?
(2) Another alternative can be: on the ClientDialogClosing event we stop the spell check completely thus preventing it to bring focus to the invisible suggestions that is the cause for the java script error.
Thanks for patiently listening to me.
The problem that our users face is reproducible with both the Cancel and Close buttons.
The issue is not that the users click the Cancel/Close button before the dialog gets loaded completely. The problem happens when the spell check has begun and then the user closes the dialog. Due to this, when the spell check web service returns with the suggestions, there is no place (since the dialog was closed/hidden) for them to be displayed. Now, at this point if the JS code tries to bring the focus to the first suggestion, the browser cribs because the control that is being tried to focus upon is hidden.
Thus as I suggested in one of my earlier posts, I can only think of the following ways to avert the problem but due to lack of proper events, I am not able to even achieve that.
(1) Ideal way should have been, to extend your suggestion, to hide the CLOSE button and show it immediately after the suggestions are listed. Is there any client side event that is generated when suggestions are displayed that I could handle to hide/show the CLOSE button?
(2) Another alternative can be: on the ClientDialogClosing event we stop the spell check completely thus preventing it to bring focus to the invisible suggestions that is the cause for the java script error.
Thanks for patiently listening to me.
0
Accepted
Hi Abhay,
Can you please try the following code which will hide the Close button (inside the RadSpell dialog) when the dialog opens and display the button after three seconds:
You can change the time values of the setTimeout functions, if needed.
Greetings,
Rumen
the Telerik team
Can you please try the following code which will hide the Close button (inside the RadSpell dialog) when the dialog opens and display the button after three seconds:
<telerik:RadSpell ID=
"RadSpell1"
runat=
"server"
ControlsToCheck=
"TextBox1"
OnClientCheckStarted=
"OnClientCheckStarted"
/>
<asp:TextBox ID=
"TextBox1"
runat=
"server"
>dassdas dasdasdas dasdas</asp:TextBox>
<script type=
"text/javascript"
>
function
OnClientCheckStarted(spell) {
setTimeout(
function
() {
var
cancelButton = spell._dialogOpener._dialogContainers.SpellCheckDialog.get_contentFrame().contentWindow.document.getElementById(
"dialogControl_Cancel"
);
cancelButton.parentNode.style.display =
"none"
;
setTimeout(
function
() {
if
(!$telerik.isIE) {
cancelButton.parentNode.parentNode.style.display =
"block"
;
}
else
cancelButton.parentNode.style.display =
"block"
;
}, 3000);
}, 350);
}
</script>
You can change the time values of the setTimeout functions, if needed.
Greetings,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Abhay Jain
Top achievements
Rank 1
answered on 02 Feb 2011, 11:08 PM
Rumen.
Hurray! It worked. Thanks!
In absence of standard (and documented) way of handling this, I guess, this is the best we can do to handle the problem. Only if there were events that got fired at the beginning of spell check (call to spell check web service) and at the end (when the web service returns with the suggestions). Currently, ClientCheckStarted is fired when the spell checker dialog box opens and ClientCheckFinished is raised when dialog box closes and that too only if the user has either corrected or ignored each of the spell errors (rendering the ClientCheckFinished event useless in my scenario).
As you mentioned in your response, I had to change the time for the external setTimeout call to get it working. With 350ms, it wasn't able to find out the DOM element for 'Cancel' button, at least on my local machine. I will have to deploy the solution and see if the delay that I've set currently (1second instead of 350ms) is fine on every user's machine.
I hope Telerik has taken care of the issue that I faced, in later releases.
Once again, thanks Rumen for following this thread very earnestly and for your time. Really appreciate that!
~Abhay
Hurray! It worked. Thanks!
In absence of standard (and documented) way of handling this, I guess, this is the best we can do to handle the problem. Only if there were events that got fired at the beginning of spell check (call to spell check web service) and at the end (when the web service returns with the suggestions). Currently, ClientCheckStarted is fired when the spell checker dialog box opens and ClientCheckFinished is raised when dialog box closes and that too only if the user has either corrected or ignored each of the spell errors (rendering the ClientCheckFinished event useless in my scenario).
As you mentioned in your response, I had to change the time for the external setTimeout call to get it working. With 350ms, it wasn't able to find out the DOM element for 'Cancel' button, at least on my local machine. I will have to deploy the solution and see if the delay that I've set currently (1second instead of 350ms) is fine on every user's machine.
I hope Telerik has taken care of the issue that I faced, in later releases.
Once again, thanks Rumen for following this thread very earnestly and for your time. Really appreciate that!
~Abhay