Skip to content

Commit 3aec0e2

Browse files
committed
Merge pull request binary-com#1119 from negar-binary/negar/price_stream_fixes
trade ui fixes
2 parents a4d4b59 + 71d3a31 commit 3aec0e2

File tree

1 file changed

+11
-9
lines changed
  • src/javascript/binary/pages/trade

1 file changed

+11
-9
lines changed

src/javascript/binary/pages/trade/price.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,14 @@ var Price = (function() {
219219
}
220220
}
221221

222-
extraInfo['longcode'] = extraInfo['longcode'].replace(/[\d\,]+\.\d\d/, function(x) {
223-
return '<b>' + x + '</b>';
224-
});
225-
226-
description.setAttribute('title', extraInfo['longcode']);
227-
} else {
228-
description.setAttribute('title', extraInfo['longcode']);
222+
if (extraInfo['longcode'] && window.innerWidth > 500) {
223+
extraInfo['longcode'] = extraInfo['longcode'].replace(/[\d\,]+\.\d\d/, function(x) {
224+
return '<b>' + x + '</b>';
225+
});
226+
description.setAttribute('title', extraInfo['longcode']);
227+
} else {
228+
description.removeAttribute('title');
229+
}
229230
}
230231

231232
error.show();
@@ -250,12 +251,13 @@ var Price = (function() {
250251
}
251252
}
252253

253-
if (proposal && proposal['longcode']) {
254+
if (proposal && proposal['longcode'] && window.innerWidth > 500) {
254255
proposal['longcode'] = proposal['longcode'].replace(/[\d\,]+\.\d\d/, function(x) {
255256
return '<b>' + x + '</b>';
256257
});
257-
description.removeAttribute('title');
258258
description.setAttribute('title', proposal['longcode']);
259+
} else {
260+
description.removeAttribute('title');
259261
}
260262

261263
purchase.show();

0 commit comments

Comments
 (0)