WatermarkTextBox IE issue

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
10/18/2010 1:02:21 PM
Gravatar
Total Posts 39

WatermarkTextBox IE issue

In IE 7 and 8, if you tab into a WatermarkTextBox, there is no cursor (cursor as in the blinking bar--not the mouse pointer) visible. It works as expected in Chrome and Firefox. This probably isn't a big deal for the search box, but I am trying to use WatermarkTextBoxes on a form where users will likely tab between the fields. In this scenario I think it could be confusing for users.

Incidentally, I just tested my own implementation of a watermarked textbox (in a non-mojoportal application), and the behavior was the same. It appears that clearing the contents of a focused textbox causes the cursor to disappear in IE. The work-around I found is to call select() (if using jQuery) on the textbox after clearing its contents. This causes the cursor to appear. (and still behaves correctly in Firefox and Chrome)

It would be nice if this fix were included in a future release.

Thanks,

Kevin

10/19/2010 6:48:45 AM
Gravatar
Total Posts 18439

Re: WatermarkTextBox IE issue

Do you have a code change to propose for this?

Thanks,

Joe

10/19/2010 12:45:54 PM
Gravatar
Total Posts 39

Re: WatermarkTextBox IE issue

In the function watermarkEnter, adding:

obj.select();

after

obj.style.color = '';

solves the problem.

Incidentally, I tried just editing watermarktextbox.js to make this change, but then I saw it is actually pulling the code from mojocombined.js. I take it the scripts are combined at build time, not at runtime, and the individual scripts are included for reference only?

Thanks,

Kevin

You must sign in to post in the forums. This thread is closed to new posts.