javascript - jQuery UI Autocomplete IE Cursor Position Bug -


मैंने अभी उत्कृष्ट jQuery UI स्वत: पूर्ण कार्यान्वित किया है।

IE 8 में एक अजीब बग (और शायद अन्य संस्करण)।

जब आप आईई 8 में सुझावों के बॉक्स से एक आइटम का चयन करते हैं तो कर्सर उस शब्द के ठीक पहले पाठ बॉक्स की शुरुआत करने के लिए जाता है जो अभी तक डाला गया है।

फ़ायरफ़ॉक्स ने डाला शब्द के बाद कर्सर डाल दिया

पाठ "itemprop =" text ">

निम्न कोड को चयनित ईवेंट में जोड़ने का प्रयास करें जो कि autocomplte फ़ंक्शन को पास किया गया है।

इसलिए यदि आपके पास:

  JQuery ('कुछ')। स्वतः पूर्ण ({source: availableTags});  

इसे परिवर्तित करें:

  jQuery ('some_val')। स्वत: पूर्ण ({source: availableTags, select: function (event, ui) {if (Document.selection) {this.focus (); var oSel = document.selection.createRange (); oSel.moveStart ('character', this.value.length); oSel.moveEnd ('चरित्र', 0); ओसेल .select ();}}})  

और देखें:


Comments

Popular posts from this blog

php - Login to icq account to receive messages from contact #12345678 -

windows - Heroku throws SQLITE3 Read only exception -

string - javascript - switch not working -