TinyMCE, inline link dialog:

- Remove the bottom half of the (old) modal and add autocomplete on the URL field.
- Disable the inline edit dialog in old IE (7, 8 and 9). Use only the modal there.
- Fix in IE10 and 11.
- Fix (most?) remaining edge cases.
- Fix focusing the inline dialog, the modal and the editor.

See #33301.
Built from https://develop.svn.wordpress.org/trunk@36677


git-svn-id: http://core.svn.wordpress.org/trunk@36644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz
2016-02-24 06:20:26 +00:00
parent 061cbfadba
commit 771cfe22ba
11 changed files with 269 additions and 791 deletions

View File

@@ -84,8 +84,7 @@
}
.mce-textbox,
.mce-checkbox i.mce-i-checkbox,
#wp-link .query-results {
.mce-checkbox i.mce-i-checkbox {
border: 1px solid #ddd;
-webkit-border-radius: 0;
border-radius: 0;
@@ -1334,11 +1333,6 @@ i.mce-i-wp_code:before {
height: 100%;
}
#wp-link-wrap.search-panel-visible {
height: 500px;
margin-top: -250px;
}
#wp-link-wrap .wp-link-text-field {
display: none;
}
@@ -1406,12 +1400,6 @@ i.mce-i-wp_code:before {
#wp-link-wrap.search-panel-visible #link-selector {
-webkit-overflow-scrolling: touch;
padding: 0 16px;
position: absolute;
top: 36px;
right: 0;
left: 0;
bottom: 44px;
}
#wp-link ol,
@@ -1421,20 +1409,6 @@ i.mce-i-wp_code:before {
padding: 0;
}
#wp-link-search-toggle:after {
display: inline-block;
font: normal 20px/1 dashicons;
vertical-align: top;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: "\f140";
}
.search-panel-visible #wp-link-search-toggle:after {
content: "\f142";
}
#wp-link input[type="text"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
@@ -1454,17 +1428,12 @@ i.mce-i-wp_code:before {
color: inherit;
}
#wp-link-search-toggle {
cursor: pointer;
}
#wp-link label input[type="text"] {
margin-top: 5px;
margin: 5px 0 0;
width: 70%;
}
#wp-link #link-options label span,
#wp-link #search-panel label span.search-label {
#wp-link #link-options label span {
display: inline-block;
width: 80px;
text-align: left;
@@ -1474,27 +1443,6 @@ i.mce-i-wp_code:before {
word-wrap: break-word;
}
#wp-link .link-search-field {
float: right;
width: 250px;
max-width: 70%;
}
#wp-link .link-search-wrapper {
margin: 5px 0 9px;
display: block;
overflow: hidden;
}
#wp-link .link-search-wrapper span {
float: right;
margin-top: 4px;
}
#wp-link .link-search-wrapper .spinner {
margin-top: 5px;
}
#wp-link .link-target {
padding: 3px 0 0;
white-space: nowrap;
@@ -1506,22 +1454,6 @@ i.mce-i-wp_code:before {
max-width: 70%;
}
#wp-link .query-results {
border: 1px #dfdfdf solid;
margin: 0;
background: #fff;
overflow: auto;
position: absolute;
right: 16px;
left: 16px;
bottom: 16px;
top: 172px;
}
.has-text-field #wp-link .query-results {
top: 205px;
}
#wp-link li {
clear: both;
margin-bottom: 0;
@@ -1532,36 +1464,6 @@ i.mce-i-wp_code:before {
position: relative;
}
#wp-link .query-notice {
padding: 0;
border-bottom: 1px solid #dfdfdf;
background-color: #f7fcfe;
color: #000;
}
#wp-link .query-notice .query-notice-default,
#wp-link .query-notice .query-notice-hint {
display: block;
padding: 6px;
border-right: 4px solid #00a0d2;
}
#wp-link .unselectable.no-matches-found {
padding: 0;
border-bottom: 1px solid #dfdfdf;
background-color: #fef7f1;
}
#wp-link .no-matches-found .item-title {
display: block;
padding: 6px;
border-right: 4px solid #d54e21;
}
#wp-link .query-results em {
font-style: normal;
}
#wp-link li:hover {
background: #eaf2fa;
color: #151515;
@@ -1607,20 +1509,6 @@ i.mce-i-wp_code:before {
top: 5px;
}
#wp-link #search-results,
#wp-link #search-panel {
display: none;
}
#wp-link-wrap.search-panel-visible #search-panel {
display: block;
}
#wp-link .river-waiting {
display: none;
padding: 10px 0;
}
#wp-link .submitbox {
padding: 8px 16px;
background: #fcfcfc;
@@ -1651,14 +1539,6 @@ i.mce-i-wp_code:before {
margin-top: -140px;
}
#wp-link-wrap.search-panel-visible .query-results {
top: 195px;
}
#wp-link-wrap.search-panel-visible.has-text-field .query-results {
top: 235px;
}
#link-selector {
padding: 0 16px 60px;
}
@@ -1687,21 +1567,6 @@ i.mce-i-wp_code:before {
-webkit-transition: none;
transition: none;
}
#wp-link-wrap.search-panel-visible {
height: auto;
margin-top: 0;
top: 10px;
bottom: 10px;
}
.search-panel-visible #link-selector {
overflow: auto;
}
.search-panel-visible #search-panel .query-results {
position: static;
}
}
@media screen and ( max-height: 290px ) {
@@ -1718,10 +1583,6 @@ i.mce-i-wp_code:before {
height: calc(100% - 92px);
padding-bottom: 2px;
}
#search-panel .query-results {
position: static;
}
}
div.wp-link-preview {
@@ -1744,15 +1605,6 @@ div.wp-link-preview a {
cursor: pointer;
}
@media screen and ( max-width: 782px ) {
div.wp-link-preview {
margin: 8px 5px 8px 0;
max-width: 70%;
max-width: -webkit-calc(100% - 86px);
max-width: calc(100% - 86px);
}
}
div.wp-link-input {
float: right;
margin: 2px;
@@ -1767,12 +1619,31 @@ div.wp-link-input input {
box-sizing: border-box;
}
@media screen and ( max-width: 400px ) {
.ui-autocomplete.wplink-autocomplete {
z-index: 100110;
max-height: 200px;
overflow-y: auto;
}
.wplink-autocomplete li {
clear: both;
white-space: normal;
}
@media screen and ( max-width: 782px ) {
div.wp-link-preview,
div.wp-link-input {
min-width: 0;
max-width: 70%;
max-width: -webkit-calc(100% - 80px);
max-width: calc(100% - 80px);
max-width: -webkit-calc(100% - 86px);
max-width: calc(100% - 86px);
}
div.wp-link-preview {
margin: 8px 5px 8px 0;
}
div.wp-link-input {
width: 300px;
}
div.wp-link-input input {
@@ -1782,13 +1653,6 @@ div.wp-link-input input {
}
}
.ui-autocomplete.mce-wp-autocomplete {
z-index: 100100;
margin-top: 10px;
max-height: 200px;
overflow-y: auto;
}
/* =Overlay Body
-------------------------------------------------------------- */