Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit 6b75201

Browse files
author
Cristian Rodriguez
committed
Merge pull request #556 from crdlc/bug-1129517
Bug 1129517 - [Loop] Counter is not increased when user writes a space i...
2 parents ddde82b + b2a4434 commit 6b75201

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

app/elements/conversation_detail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h1 data-l10n-id="conversationDetailTitle"></h1>
1414
<input type="text" dir="auto"></input>
1515
<button type="reset"></button>
1616
</p>
17-
<p class="counter"></p>
17+
<p class="charCounter"></p>
1818
</form>
1919
<section class="camera-container gaia-list">
2020
<header data-l10n-id="defaultCamera"></header>

app/js/screens/conversation_detail.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
frontCamera = modal.querySelector('input[value="camera-front"]');
2929
cameraOptions = [rearCamera, frontCamera];
3030
cameraContainer = modal.querySelector('.camera-container');
31-
counter = modal.querySelector('.counter');
31+
counter = modal.querySelector('.charCounter');
3232
form = modal.querySelector('form');
3333
}
3434

@@ -100,7 +100,7 @@
100100
}
101101

102102
function calculateCounter() {
103-
var subject = subjectInput.value.trim();
103+
var subject = subjectInput.value;
104104
var countdown = counter.dataset.countdown = CONFIG.maxSubjectSize - subject.length;
105105
var key = countdown < 0 ? 'negativeCharactersCountdown' : 'charactersCountdown';
106106
counter.textContent = _(key, {

app/style/conversation_detail.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
border-bottom: none;
1313
}
1414

15-
#conversation-detail form p.counter {
15+
#conversation-detail form p.charCounter {
1616
margin-top: -.5rem;
1717
font-size: 1.4rem;
1818
height: 1.4rem;
@@ -22,11 +22,11 @@
2222
-moz-font-feature-settings: 'tnum';
2323
}
2424

25-
#conversation-detail form p.counter[data-countdown='140'] {
25+
#conversation-detail form p.charCounter[data-countdown='124'] {
2626
visibility: hidden;
2727
}
2828

29-
#conversation-detail form p.counter[data-countdown^='-'] {
29+
#conversation-detail form p.charCounter[data-countdown^='-'] {
3030
color: #b90000;
3131
}
3232

test/unit/test_conversation_detail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ suite('Tests ConversationDetail', function() {
1919
callButton = modal.querySelector('.call');
2020
cameraContainer = modal.querySelector('.camera-container');
2121
subjectInput = modal.querySelector('input');
22-
counter = modal.querySelector('.counter');
22+
counter = modal.querySelector('.charCounter');
2323
sinon.stub(Utils, 'onForeground', () => {
2424
return {
2525
then: function(resolve) {

0 commit comments

Comments
 (0)