Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb1f8f53

Browse files
committed
fix Mirror div does not reset its CSS
fixichord#15
1 parente88e40e commitb1f8f53

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

‎dist/jquery.caret.min.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎index.html‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@
106106
font-weight: normal;
107107
}
108108

109+
span {
110+
position: absolute;
111+
display: inline-block;
112+
}
113+
109114
a {
110115
color:#4183C4;
111116
text-decoration: none;

‎src/jquery.caret.coffee‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@
162162
pos=this.getPos()if posisundefined
163163
start_range=$inputor.val().slice(0, pos)
164164
end_range=$inputor.val().slice(pos)
165-
html="<span>"+format(start_range)+"</span>"
166-
html+="<span id='caret'>|</span>"
167-
html+="<span>"+format(end_range)+"</span>"
165+
html="<span style='position: relative; display: inline;'>"+format(start_range)+"</span>"
166+
html+="<span id='caret' style='position: relative; display: inline;'>|</span>"
167+
html+="<span style='position: relative; display: inline;'>"+format(end_range)+"</span>"
168168

169169
mirror=newMirror($inputor)
170170
at_rect=mirror.create(html).rect()

‎src/jquery.caret.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@
214214
}
215215
start_range=$inputor.val().slice(0,pos);
216216
end_range=$inputor.val().slice(pos);
217-
html="<span>"+format(start_range)+"</span>";
218-
html+="<span id='caret'>|</span>";
219-
html+="<span>"+format(end_range)+"</span>";
217+
html="<span style='position: relative; display: inline;'>"+format(start_range)+"</span>";
218+
html+="<span id='caret' style='position: relative; display: inline;'>|</span>";
219+
html+="<span style='position: relative; display: inline;'>"+format(end_range)+"</span>";
220220
mirror=newMirror($inputor);
221221
returnat_rect=mirror.create(html).rect();
222222
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp