diff options
author | Bogdan Udrescu <bogdan@vaadin.com> | 2014-07-02 18:29:56 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-07-28 12:51:52 +0000 |
commit | 236293303bff740619a95131d5360bdbfe021c95 (patch) | |
tree | 23e6569fff7f283f9eb304ace4ba49fc4345ca02 /shared | |
parent | e7632140cfe81062f1f81408c643e722661e60b5 (diff) | |
download | vaadin-framework-236293303bff740619a95131d5360bdbfe021c95.tar.gz vaadin-framework-236293303bff740619a95131d5360bdbfe021c95.zip |
TextArea size get reset when css resize is set (#14080)
Listen to MouseUp event on the <textarea> and notify the state with the width and height if changed.
Add com.vaadin.client.Util.Size to manipulates the css width/height.
Change-Id: I96a308658d2877f1f6c05feaa7840a268bb06709
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/com/vaadin/shared/util/SharedUtil.java | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/shared/src/com/vaadin/shared/util/SharedUtil.java b/shared/src/com/vaadin/shared/util/SharedUtil.java index 497a8cab01..7276f418fa 100644 --- a/shared/src/com/vaadin/shared/util/SharedUtil.java +++ b/shared/src/com/vaadin/shared/util/SharedUtil.java @@ -1,12 +1,12 @@ /* * Copyright 2000-2014 Vaadin Ltd. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -19,17 +19,17 @@ import java.io.Serializable; /** * Misc internal utility methods used by both the server and the client package. - * + * * @author Vaadin Ltd * @since 7.1 - * + * */ public class SharedUtil implements Serializable { /** * Checks if a and b are equals using {@link #equals(Object)}. Handles null * values as well. Does not ensure that objects are of the same type. * Assumes that the first object's equals method handle equals properly. - * + * * @param o1 * The first value to compare * @param o2 @@ -46,11 +46,18 @@ public class SharedUtil implements Serializable { /** * Trims trailing slashes (if any) from a string. - * @param value The string value to be trimmed. Cannot be null. + * + * @param value + * The string value to be trimmed. Cannot be null. * @return String value without trailing slashes. */ public static String trimTrailingSlashes(String value) { return value.replaceAll("/*$", ""); } + /** + * RegEx pattern to extract the width/height values. + */ + public static final String SIZE_PATTERN = "^(-?\\d*(?:\\.\\d+)?)(%|px|em|rem|ex|in|cm|mm|pt|pc)?$"; + } |