Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
6.2.X EE, 7.0.0 M3
-
6.2.x
-
Committed
-
24
-
Windows Server 2008
-
Oracle Sun JDK 7
-
Apache Tomcat 7.0
-
Internet Explorer 10
-
SQL Server 2012
Description
*Description:
Alloy UI portlet does not count characters correctly, showing a red border when one character remains. I think this is a bug because if a character remains, there should not be a red border.
Steps to reproduce:
1) Start a clean bundle of Liferay 6.2
2) *Using the 6.2 Plugins SDk, open a command prompt in the portlets folder and run:
create alloy-test "Alloy Test"
3) In the new alloy-test-portlet folder, go to docroot/js/ edit main.js and add this code (per http://alloyui.com/examples/char-counter/real-world/):
YUI().use( 'aui-char-counter', function(Y) { new Y.CharCounter( { counter: '#myCounter', input: '#myTextarea', maxLength: 140, on: { maxLength: function(event) { alert('The max length limit was reached'); } } } ); } );
4) In alloy-test-portlet/docroot edit view.jsp and add:
<textarea id="myTextarea"></textarea> <p id="myCounter"></p>
5) Open a command prompt from alloy-test-portlet and run
ant war
6) Make sure the portlet WAR is built in the dist folder of the 6.2 plugins SDK
7) Start the 6.2 bundle
8) Deploy a license and the alloy-test-portlet.war
9) Login and add the Alloy Test portlet to the home page.
10) refresh the home page
11) copy this text to the text box:
Whitespace characters used within "textarea" like elements are treated as one character but can cause validation issues take for example
I am attaching my custom portlet built using the above steps.
Expected: There is one character remaining and no red border because the character limit is not exceeded.
Actual: There is one character remaining but there is a red border.
Branch 62x - 90722f8d013f84b6c1a9f82b97dc4a7be0636aca: Reproduced
Master - 1ac80c24533c9638edb57ef9ed35b3e80ea89d5a: Fixed
Attachments
Issue Links
- is duplicated by
-
LPS-50980 Character count for textarea element input in Char Counter is incorrectly calculated in Chrome
- Closed
- relates
-
LPS-50980 Character count for textarea element input in Char Counter is incorrectly calculated in Chrome
- Closed
-
AUI-1715 Character count for textarea element input in Char Counter is incorrectly calculated in Chrome
-
- Closed
-
-
LPE-13024 Alloy UI portlet does not count characters correctly, showing a red border when one character remains.
-
- Closed
-