Skip to content

Commit 5db5d52

Browse files
authored
Use the same family font in tmpEdTxt and edTxt
1 parent d7cefcc commit 5db5d52

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: extensions/editbox/CCEditBox.js

+2
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,7 @@ cc.EditBox.create = function (size, normal9SpriteBg, press9SpriteBg, disabled9Sp
854854
var thisPointer = this;
855855
var tmpEdTxt = this._edTxt = document.createElement('input');
856856
tmpEdTxt.type = 'text';
857+
tmpEdTxt.style.fontFamily = this._edFontName;
857858
tmpEdTxt.style.fontSize = this._edFontSize + 'px';
858859
tmpEdTxt.style.color = '#000000';
859860
tmpEdTxt.style.border = 0;
@@ -949,6 +950,7 @@ cc.EditBox.create = function (size, normal9SpriteBg, press9SpriteBg, disabled9Sp
949950
var thisPointer = this;
950951
var tmpEdTxt = this._edTxt = document.createElement('textarea');
951952
tmpEdTxt.type = 'text';
953+
tmpEdTxt.style.fontFamily = this._edFontName;
952954
tmpEdTxt.style.fontSize = this._edFontSize + 'px';
953955
tmpEdTxt.style.color = '#000000';
954956
tmpEdTxt.style.border = 0;

0 commit comments

Comments
 (0)