javascript - Hide blinking cursor from Jquery UI modal dailog -


this view.

<div class="login-card">     <h1>log-in</h1>     <br>      <input type="text" id="txtuser" placeholder="username" autofocus value="adm">     <input type="password" id="txtpass" placeholder="password" value="adm">     <input type="button" name="btnlogin" class="login login-submit" value="login" onclick="btnloginclick($('#txtuser').val(), $('#txtpass').val())"> </div>  @globalhelper.createdivformodaldialog("divloginerror", "error", "login failed ! try again") 

this script.

$(document).ready(function () {     $('#divloginerror').hide(); })  function btnloginclick(username, password) {     $.ajax({         url: "/home/validatelogin",         data: { username: username, password: password },         datatype: "json",         success: function (data) {             var dialogerror = $("#divloginerror").dialog({                 modal: true,                 autoopen: false,                 position: { my: "center", at: "center center", of: window },                 height: dialogsize.getheight(25),                 width: dialogsize.getwidth(25),                 overflow: scroll             });              if (data.tostring() == 'true') {                 window.location.href = "/home/fwmenu";             }             else {                 dialogerror.dialog("open");                 $('#txtuser').focus();             }         },         error: function (e) {             alert('error');         }     }); } 

problem on login failed when error message dailog box coming, showing blinking cursor,the cursor blinking behind dailog box in username textarea. why happening , how solve it? below 2 screen shots.

enter image description here

now cursor blinking actually.

enter image description here

it due ie not jquery. in fact have same problem in ie8. cursor kept blanking in search box while displaying loading image on page.
works fine in firefox , chrome tested.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -