mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
fix(app): user-select on desktop
This commit is contained in:
@ -35,6 +35,10 @@ ion-app,
|
|||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ion-app.is-device {
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
@ -20,11 +20,14 @@ export class App {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hostData() {
|
hostData() {
|
||||||
|
const device = this.config.getBoolean('isDevice', isDevice(this.win));
|
||||||
const hybrid = isHybrid(this.win);
|
const hybrid = isHybrid(this.win);
|
||||||
const statusBar = this.config.getBoolean('statusbarPadding', hybrid);
|
const statusBar = this.config.getBoolean('statusbarPadding', hybrid);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
class: {
|
class: {
|
||||||
|
'is-device': device,
|
||||||
|
'is-hydrid': hybrid,
|
||||||
'statusbar-padding': statusBar
|
'statusbar-padding': statusBar
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -135,7 +135,6 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
opacity: var(--opacity);
|
opacity: var(--opacity);
|
||||||
overflow: var(--overflow);
|
overflow: var(--overflow);
|
||||||
user-select: none;
|
|
||||||
vertical-align: top; // the better option for most scenarios
|
vertical-align: top; // the better option for most scenarios
|
||||||
vertical-align: -webkit-baseline-middle; // the best for those that support it
|
vertical-align: -webkit-baseline-middle; // the best for those that support it
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host(.checkbox-checked) .checkbox-icon {
|
:host(.checkbox-checked) .checkbox-icon {
|
||||||
|
@ -62,7 +62,6 @@
|
|||||||
contain: strict;
|
contain: strict;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
user-select: none;
|
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
font-kerning: none;
|
font-kerning: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
|
@ -12,6 +12,8 @@ ion-infinite-scroll-content {
|
|||||||
min-height: $infinite-scroll-content-min-height;
|
min-height: $infinite-scroll-content-min-height;
|
||||||
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.infinite-loading {
|
.infinite-loading {
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-icon {
|
.radio-icon {
|
||||||
|
@ -61,7 +61,6 @@
|
|||||||
contain: content;
|
contain: content;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
user-select: none;
|
|
||||||
font-kerning: none;
|
font-kerning: none;
|
||||||
|
|
||||||
&:active,
|
&:active,
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
width: 28px;
|
width: 28px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
|
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host(.ion-color) {
|
:host(.ion-color) {
|
||||||
|
@ -38,7 +38,6 @@ body {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
user-select: none;
|
|
||||||
|
|
||||||
-webkit-user-drag: none;
|
-webkit-user-drag: none;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user