2017-08-11 7 views

答えて

1
try this 
css file:- 
ion-content{ 
    overflow-scroll: true; 
} 

.scroll-content { 
    -webkit-user-select: auto !important; 
    -moz-user-select: auto !important; 
    -ms-user-select: auto !important; 
    user-select: auto !important;} 

.selectable { 
    -webkit-user-select: auto; 
} 
Controller:- 
stop_browser_behavior: false 

self.touchStart = function(e) { 
    self.startCoordinates = getPointerCoordinates(e); 

    if (ionic.tap.ignoreScrollStart(e)) { 
    return; 
    } 

    if(ionic.tap.containsOrIsTextInput(e.target)) { 
    // do not start if the target is a text input 
    // if there is a touchmove on this input, then we can start the scroll 
    self.__hasStarted = false; 
    return; 
    } 

    self.__isSelectable = true; 
    self.__enableScrollY = true; 
    self.__hasStarted = true; 
    self.doTouchStart(e.touches, e.timeStamp); 
    // e.preventDefault(); 
}; 
html file:- 
<div class='selectable'> 

     // Text that users should be able to select and copy. 
     </div> 
0

以下のコードを.cssファイルで試してみてください。

.selectable { 
    -webkit-user-select: text; 
    -moz-user-select: text; 
    -ms-user-select: text; 
    user-select: text; 
} 
+0

あなたが適切なタグでファイルを.htmlのためにCSSクラスを設定している –

+0

私のために働いていませんか? – shahnilay86

+0

私はHTMLに影響するか選択可能ファイル –

関連する問題